Child pages
  • Non-Portable Classes

Versions Compared

Key

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

...

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

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

h2. Introduction

The following classes are known to be non portable (not shareable).
As of Terracotta version 2.3, this list may be complete—some unsupported classes may not be listed here. This list is updated as support is added for
more classes.

There are two types of unsupported classes in Terracotta:
* *Never-Portable* - these classes represent local resources or other non-shareable classes and are never shared.
* *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.

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}

{note}
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.
{note}

*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.

h2. Unsupported Classes in Terracotta 2.57
The following list shows classes that are not shareable in Terracotta version 2.57 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
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.AtomicReference
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.lang.ref.SoftReference
java.lang.ref.WeakReference
java.lang.ref.PhantomReference
java.lang.ref.Reference
java.lang.ref.ReferenceQueue
{noformat}

h2. Unsupported Classes in Terracotta 2.3

The following list shows classes that are not shareable in Terracotta version 2.3 and earlier.

{noformat}
java.util.concurrent.locks.ReentrantReadWriteLock
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock
java.lang.reflect.Method
{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}