Package org.infinispan.marshall.core
Class GlobalMarshaller
java.lang.Object
org.infinispan.marshall.core.GlobalMarshaller
- All Implemented Interfaces:
org.infinispan.commons.marshall.Marshaller,org.infinispan.commons.marshall.StreamingMarshaller
public class GlobalMarshaller
extends Object
implements org.infinispan.commons.marshall.StreamingMarshaller
A globally-scoped marshaller. This is needed so that the transport layer
can unmarshall requests even before it's known which cache's marshaller can
do the job.
- Since:
- 5.0
- Author:
- Galder ZamarreƱo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> org.infinispan.commons.marshall.Externalizer<T> voidvoidorg.infinispan.commons.marshall.BufferSizePredictorstatic org.infinispan.commons.marshall.AdvancedExternalizergetExternalExternalizer(GlobalMarshaller gm, Class<?> clazz) static org.infinispan.commons.marshall.AdvancedExternalizergetInteralExternalizer(GlobalMarshaller gm, Class<?> clazz) booleanorg.infinispan.commons.dataconversion.MediaTypeobjectFromByteBuffer(byte[] buf) objectFromByteBuffer(byte[] bytes, int offset, int len) org.infinispan.commons.io.ByteBufferbyte[]objectToByteBuffer(Object obj) byte[]objectToByteBuffer(Object obj, int estimatedSize) voidobjectToObjectStream(Object obj, ObjectOutput out) static Objectvoidstart()startObjectInput(InputStream is, boolean isReentrant) startObjectOutput(OutputStream os, boolean isReentrant, int estimatedSize) voidstop()static voidwriteExternalClean(Object obj, org.infinispan.commons.marshall.AdvancedExternalizer ext, ObjectOutput out) static voidwriteInternalClean(Object obj, org.infinispan.commons.marshall.AdvancedExternalizer ext, ObjectOutput out) static voidwriteUnknown(org.infinispan.commons.marshall.Marshaller marshaller, Object obj, ObjectOutput out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.commons.marshall.Marshaller
initialize
-
Field Details
-
NOT_FOUND
public static final int NOT_FOUND- See Also:
-
ID_NULL
public static final int ID_NULL- See Also:
-
ID_PRIMITIVE
public static final int ID_PRIMITIVE- See Also:
-
ID_INTERNAL
public static final int ID_INTERNAL- See Also:
-
ID_EXTERNAL
public static final int ID_EXTERNAL- See Also:
-
ID_ANNOTATED
public static final int ID_ANNOTATED- See Also:
-
ID_UNKNOWN
public static final int ID_UNKNOWN- See Also:
-
-
Constructor Details
-
GlobalMarshaller
public GlobalMarshaller()
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.infinispan.commons.marshall.Marshaller- Specified by:
startin interfaceorg.infinispan.commons.marshall.StreamingMarshaller
-
stop
public void stop()- Specified by:
stopin interfaceorg.infinispan.commons.marshall.Marshaller- Specified by:
stopin interfaceorg.infinispan.commons.marshall.StreamingMarshaller
-
getPersistenceMarshaller
-
objectToByteBuffer
- Specified by:
objectToByteBufferin interfaceorg.infinispan.commons.marshall.Marshaller- Throws:
IOExceptionInterruptedException
-
objectFromByteBuffer
- Specified by:
objectFromByteBufferin interfaceorg.infinispan.commons.marshall.Marshaller- Throws:
IOExceptionClassNotFoundException
-
startObjectOutput
public ObjectOutput startObjectOutput(OutputStream os, boolean isReentrant, int estimatedSize) throws IOException - Specified by:
startObjectOutputin interfaceorg.infinispan.commons.marshall.StreamingMarshaller- Throws:
IOException
-
objectToObjectStream
- Specified by:
objectToObjectStreamin interfaceorg.infinispan.commons.marshall.StreamingMarshaller- Throws:
IOException
-
finishObjectOutput
- Specified by:
finishObjectOutputin interfaceorg.infinispan.commons.marshall.StreamingMarshaller
-
objectFromByteBuffer
public Object objectFromByteBuffer(byte[] bytes, int offset, int len) throws IOException, ClassNotFoundException - Specified by:
objectFromByteBufferin interfaceorg.infinispan.commons.marshall.Marshaller- Throws:
IOExceptionClassNotFoundException
-
objectFromInputStream
- Specified by:
objectFromInputStreamin interfaceorg.infinispan.commons.marshall.StreamingMarshaller- Throws:
IOExceptionClassNotFoundException
-
isMarshallable
- Specified by:
isMarshallablein interfaceorg.infinispan.commons.marshall.Marshaller- Throws:
Exception
-
getBufferSizePredictor
- Specified by:
getBufferSizePredictorin interfaceorg.infinispan.commons.marshall.Marshaller
-
mediaType
public org.infinispan.commons.dataconversion.MediaType mediaType()- Specified by:
mediaTypein interfaceorg.infinispan.commons.marshall.Marshaller
-
objectToBuffer
public org.infinispan.commons.io.ByteBuffer objectToBuffer(Object o) throws IOException, InterruptedException - Specified by:
objectToBufferin interfaceorg.infinispan.commons.marshall.Marshaller- Throws:
IOExceptionInterruptedException
-
objectToByteBuffer
public byte[] objectToByteBuffer(Object obj, int estimatedSize) throws IOException, InterruptedException - Specified by:
objectToByteBufferin interfaceorg.infinispan.commons.marshall.Marshaller- Throws:
IOExceptionInterruptedException
-
startObjectInput
- Specified by:
startObjectInputin interfaceorg.infinispan.commons.marshall.StreamingMarshaller
-
finishObjectInput
- Specified by:
finishObjectInputin interfaceorg.infinispan.commons.marshall.StreamingMarshaller
-
objectFromObjectStream
- Specified by:
objectFromObjectStreamin interfaceorg.infinispan.commons.marshall.StreamingMarshaller
-
findExternalizerFor
-
getInteralExternalizer
public static org.infinispan.commons.marshall.AdvancedExternalizer getInteralExternalizer(GlobalMarshaller gm, Class<?> clazz) -
getExternalExternalizer
public static org.infinispan.commons.marshall.AdvancedExternalizer getExternalExternalizer(GlobalMarshaller gm, Class<?> clazz) -
readObjectFromObjectInput
public static Object readObjectFromObjectInput(GlobalMarshaller gm, ObjectInput in) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
writeUnknown
public static void writeUnknown(org.infinispan.commons.marshall.Marshaller marshaller, Object obj, ObjectOutput out) throws IOException - Throws:
IOException
-
writeInternalClean
public static void writeInternalClean(Object obj, org.infinispan.commons.marshall.AdvancedExternalizer ext, ObjectOutput out) -
writeExternalClean
public static void writeExternalClean(Object obj, org.infinispan.commons.marshall.AdvancedExternalizer ext, ObjectOutput out)
-