Class JBossMarshaller
java.lang.Object
org.infinispan.commons.marshall.AbstractMarshaller
org.infinispan.jboss.marshalling.commons.AbstractJBossMarshaller
org.infinispan.jboss.marshalling.core.JBossMarshaller
- All Implemented Interfaces:
Marshaller
,StreamingMarshaller
- Direct Known Subclasses:
JBossUserMarshaller
A JBoss Marshalling based marshaller that is oriented at internal, embedded, Infinispan usage. It uses of a custom
object table for Infinispan based Externalizer instances that are either internal or user defined.
The reason why this is implemented specially in Infinispan rather than resorting to Java serialization or even the
more efficient JBoss serialization is that a lot of efficiency can be gained when a majority of the serialization
that occurs has to do with a small set of known types such as
GlobalTransaction
or ReplicableCommand
, and class type information can be replaced with simple magic
numbers.
Unknown types (typically user data) falls back to Java serialization.- Since:
- 4.0
- Author:
- Galder ZamarreƱo, Sanne Grinovero
-
Nested Class Summary
Nested classes/interfaces inherited from class org.infinispan.jboss.marshalling.commons.AbstractJBossMarshaller
AbstractJBossMarshaller.DebuggingExceptionListener
-
Field Summary
Fields inherited from class org.infinispan.jboss.marshalling.commons.AbstractJBossMarshaller
baseCfg, DEF_CLASS_COUNT, DEF_INSTANCE_COUNT, factory, log
Fields inherited from class org.infinispan.commons.marshall.AbstractMarshaller
marshallableTypeHints
-
Method Summary
Methods inherited from class org.infinispan.jboss.marshalling.commons.AbstractJBossMarshaller
finishObjectInput, finishObjectOutput, isMarshallable, mediaType, objectFromByteBuffer, objectFromObjectStream, objectToBuffer, objectToObjectStream, startObjectInput, startObjectOutput
Methods inherited from class org.infinispan.commons.marshall.AbstractMarshaller
getBufferSizePredictor, objectFromByteBuffer, objectFromInputStream, objectToBuffer, objectToByteBuffer, objectToByteBuffer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.commons.marshall.Marshaller
getBufferSizePredictor, initialize, isMarshallable, mediaType, objectFromByteBuffer, objectFromByteBuffer, objectToBuffer, objectToByteBuffer, objectToByteBuffer
Methods inherited from interface org.infinispan.commons.marshall.StreamingMarshaller
finishObjectInput, finishObjectOutput, objectFromInputStream, objectFromObjectStream, objectToObjectStream, startObjectInput, startObjectOutput
-
Method Details
-
start
public void start()Description copied from interface:Marshaller
Perform any initialization required before the marshaller is used.- Specified by:
start
in interfaceMarshaller
- Specified by:
start
in interfaceStreamingMarshaller
- Overrides:
start
in classAbstractJBossMarshaller
-
stop
public void stop()Description copied from interface:StreamingMarshaller
Stop the marshaller. Implementations of this method should clear up any cached data, or close any resources while marshalling/unmarshalling that have not been already closed.- Specified by:
stop
in interfaceMarshaller
- Specified by:
stop
in interfaceStreamingMarshaller
- Overrides:
stop
in classAbstractJBossMarshaller
-
isMarshallableCandidate
- Overrides:
isMarshallableCandidate
in classAbstractJBossMarshaller
-