Child pages
  • Non-Portable Classes

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width260px
Wiki Markup
{div:style=margin-top:20px}
{include:documentation-index}
{div}
Column
Wiki Markup
{div9:id=documentationcolumn}
{include:HeaderBasic}


h1. Non-Portable Classes
{toc:minLevel=2|maxLevel=2}

h2. Introduction

Non-portable classes are not shareable in Terracotta.

There are two types of non-portable classes in Terracotta:
* [*Never-Portable*|#never portable] - these classes represent local resources or other non-shareable classes and are never shared.
* [*Unsupported*|#unsupported] - currently these classes are not supported by Terracotta but may be supported in the future.

*Further Reading:*
See the [Concept and Architecture Guide|Concept and Architecture Guide#portability] for more information on portability in Terracotta.

{anchor:never portable}
h2. Never-Portable Classes

The following list shows classes that are never shareable. Generally, these classes are not shareable because they are intrinsically associated with a local resource such as a socket, a file descriptor, or a thread:

{noformat}
java.awt.Component
java.lang.Thread
java.lang.ThreadGroup
java.lang.Process
java.lang.ClassLoader
java.lang.Runtime
java.io.FileReader
java.io.FileWriter
java.io.FileDescriptor
java.io.FileInputStream
java.io.FileOutputStream
java.net.DatagramSocket
java.net.DatagramSocketImpl
java.net.MulticastSocket
java.net.ServerSocket
java.net.Socket
java.net.SocketImpl
java.nio.channels.DatagramChannel
java.nio.channels.FileChannel
java.nio.channels.FileLock
java.nio.channels.ServerSocketChannel
java.nio.channels.SocketChannel
java.util.logging.FileHandler
java.util.logging.SocketHandler
javax.servlet.GenericServlet (and all subclasses)
{noformat}

{tip}
If your current code base contains references to any of these classes, use the Terracotta setting {{honor-transient}}. This mechanism specifies whether Terracotta should or should not share a field in a class that is marked with the transient keyword.
{tip}

*Further Reading:*
See the [Concept and Architecture Guide|Concept and Architecture Guide#transience] for more information on transience in Terracotta.
See the [Configuration Guide and Reference|Configuration Guide and Reference#instrumented-classes] for more information on configuring transience in Terracotta.

{anchor:unsupported}
h2. Unsupported Classes in Terracotta 3.02
The following list shows classes that are not shareable in Terracotta version 3.0 and earlier.

{noformat}
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ArrayBlockingQueue
java.util.concurrent.ConcurrentLinkedQueue
java.util.concurrent.ConcurrentSkipListSet
java.util.concurrent.ConcurrentSkipListMap
java.util.concurrent.CopyOnWriteArrayList
java.util.concurrent.CopyOnWriteArraySet
java.util.concurrent.CountDownLatch
java.util.concurrent.DelayQueue
java.util.concurrent.Exchanger
java.util.concurrent.ExecutorCompletionService
java.util.concurrent.Executors
java.util.concurrent.LinkedBlockingDeque (NOTE: Deque not Queue)
java.util.concurrent.PriorityBlockingQueue
java.util.concurrent.ScheduledThreadPoolExecutor
java.util.concurrent.Semaphore
java.util.concurrent.SynchronousQueue
java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ThreadPoolExecutor.AbortPolicy
java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy
java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy
java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
java.util.concurrent.atomic.AtomicBoolean
java.util.concurrent.atomic.AtomicIntegerArray
java.util.concurrent.atomic.AtomicIntegerFieldUpdater
java.util.concurrent.atomic.AtomicLongArray
java.util.concurrent.atomic.AtomicLongFieldUpdater
java.util.concurrent.atomic.AtomicMarkableReference
java.util.concurrent.atomic.AtomicReferenceArray
java.util.concurrent.atomic.ReferenceFieldUpdater
java.util.concurrent.atomic.AtomicStampedReference
java.util.concurrent.locks.AbstractOwnableSynchronizer
java.util.concurrent.locks.AbstractQueuedLongSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer
java.util.concurrent.locks.LockSupport
java.util.WeakHashMap
java.lang.ref.SoftReference
java.lang.ref.WeakReference
java.lang.ref.PhantomReference
java.lang.ref.Reference
java.lang.ref.ReferenceQueue
{noformat}

{note}
In many cases, the {{java.util.concurrent.*}} classes can be replaced by an equivalent class from the oswego concurrent class library.
{note}

{div9}