Reference Documentation
{div:style=margin-top:20px}
{include:documentation-index}
{div}
{div9:id=documentationcolumn}
{include:HeaderBasic}


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

h2. Introduction

The following classes are known to be non portable (not shareable).

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.7
The following list shows classes that are not shareable in Terracotta version 2.7 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.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}

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

{div9}