public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorImpl implements CacheObjectBinaryProcessor
GridComponent.DiscoveryDataExchangeTypectx, log| Constructor and Description |
|---|
CacheObjectBinaryProcessorImpl(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMeta(int typeId,
BinaryType newMeta) |
Object |
affinityKey(BinaryObject po) |
IgniteBinary |
binary() |
BinaryObject |
buildEnum(String typeName,
int ord) |
BinaryObjectBuilder |
builder(BinaryObject portableObj)
Creates builder initialized by existing portable object.
|
BinaryObjectBuilder |
builder(String clsName) |
CacheObjectContext |
contextForCache(CacheConfiguration cfg) |
Object |
field(Object obj,
String fieldName) |
boolean |
hasField(Object obj,
String fieldName)
Checks whether field is set in the object.
|
boolean |
isPortableEnabled(CacheConfiguration<?,?> ccfg)
Checks whether given class is portable.
|
boolean |
isPortableObject(Object obj)
Checks whether object is portable object.
|
byte[] |
marshal(CacheObjectContext ctx,
Object val) |
byte[] |
marshal(Object obj) |
GridPortableMarshaller |
marshaller() |
Object |
marshalToPortable(Object obj) |
Collection<BinaryType> |
metadata() |
Map<Integer,BinaryType> |
metadata(Collection<Integer> typeIds) |
BinaryType |
metadata(int typeId) |
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onUtilityCacheStarted() |
PortableContext |
portableContext() |
void |
start()
Starts grid component.
|
KeyCacheObject |
toCacheKeyObject(CacheObjectContext ctx,
Object obj,
boolean userObj) |
CacheObject |
toCacheObject(CacheObjectContext ctx,
byte type,
byte[] bytes) |
CacheObject |
toCacheObject(CacheObjectContext ctx,
Object obj,
boolean userObj) |
CacheObject |
toCacheObject(GridCacheContext ctx,
long valPtr,
boolean tmp) |
Object |
toPortable(Object obj) |
int |
typeId(Object obj) |
int |
typeId(String typeName) |
Object |
unmarshal(CacheObjectContext ctx,
byte[] bytes,
ClassLoader clsLdr) |
Object |
unmarshal(long ptr,
boolean forceHeap) |
Object |
unwrapTemporary(GridCacheContext ctx,
Object obj)
Converts temporary off-heap object to heap-based.
|
void |
updateMetadata(int typeId,
String typeName,
String affKeyFieldName,
Map<String,Integer> fieldTypeIds,
boolean isEnum) |
immutable, prepareForCache, toCacheKeyObject0, toCacheObject0assertParameter, collectDiscoveryData, discoveryDataType, onDisconnected, onDiscoveryDataReceived, onKernalStart, onReconnected, printMemoryStats, stop, toString, validateNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitimmutable, prepareForCachecollectDiscoveryData, discoveryDataType, onDisconnected, onDiscoveryDataReceived, onKernalStart, onReconnected, printMemoryStats, stop, validateNodepublic CacheObjectBinaryProcessorImpl(GridKernalContext ctx)
ctx - Kernal context.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void onUtilityCacheStarted()
throws IgniteCheckedException
onUtilityCacheStarted in interface IgniteCacheObjectProcessoronUtilityCacheStarted in class IgniteCacheObjectProcessorImplIgniteCheckedException - If failed.GridComponent.onKernalStart()public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public int typeId(String typeName)
typeId in interface IgniteCacheObjectProcessortypeId in class IgniteCacheObjectProcessorImpltypeName - Type name.public byte[] marshal(@Nullable Object obj) throws BinaryObjectException
obj - Object.BinaryObjectException - If failed.public Object unmarshal(long ptr, boolean forceHeap) throws BinaryObjectException
ptr - Off-heap pointer.forceHeap - If true creates heap-based object.BinaryObjectException - If failed.public Object marshalToPortable(@Nullable Object obj) throws BinaryObjectException
marshalToPortable in interface CacheObjectBinaryProcessorobj - Original object.BinaryObjectExceptionpublic GridPortableMarshaller marshaller()
public BinaryObjectBuilder builder(String clsName)
builder in interface CacheObjectBinaryProcessorclsName - Class name.public BinaryObjectBuilder builder(BinaryObject portableObj)
builder in interface CacheObjectBinaryProcessorportableObj - Portable object to edit.public void updateMetadata(int typeId,
String typeName,
@Nullable
String affKeyFieldName,
Map<String,Integer> fieldTypeIds,
boolean isEnum)
throws BinaryObjectException
updateMetadata in interface CacheObjectBinaryProcessortypeId - Type ID.typeName - Type name.affKeyFieldName - Affinity key field name.fieldTypeIds - Fields map.isEnum - Enum flag.BinaryObjectExceptionpublic void addMeta(int typeId,
BinaryType newMeta)
throws BinaryObjectException
addMeta in interface CacheObjectBinaryProcessortypeId - Type ID.newMeta - New meta data.BinaryObjectException@Nullable public BinaryType metadata(int typeId) throws BinaryObjectException
metadata in interface CacheObjectBinaryProcessortypeId - Type ID.BinaryObjectExceptionpublic Map<Integer,BinaryType> metadata(Collection<Integer> typeIds) throws BinaryObjectException
metadata in interface CacheObjectBinaryProcessortypeIds - Type ID.BinaryObjectExceptionpublic Collection<BinaryType> metadata() throws BinaryObjectException
metadata in interface CacheObjectBinaryProcessorBinaryObjectExceptionpublic BinaryObject buildEnum(String typeName, int ord) throws IgniteException
buildEnum in interface CacheObjectBinaryProcessortypeName - Type name.ord - ordinal.IgniteException - If failed.public IgniteBinary binary() throws IgniteException
binary in interface CacheObjectBinaryProcessorbinary in interface IgniteCacheObjectProcessorbinary in class IgniteCacheObjectProcessorImplIgniteException - If failed.public boolean isPortableObject(Object obj)
isPortableObject in interface IgniteCacheObjectProcessorisPortableObject in class IgniteCacheObjectProcessorImplobj - Object to check.True if object is already a portable object, false otherwise.public boolean isPortableEnabled(CacheConfiguration<?,?> ccfg)
isPortableEnabled in interface IgniteCacheObjectProcessorisPortableEnabled in class IgniteCacheObjectProcessorImpltrue If portable objects are enabled.public Object affinityKey(BinaryObject po)
po - Portable object.public int typeId(Object obj)
typeId in interface IgniteCacheObjectProcessortypeId in class IgniteCacheObjectProcessorImplobj - Object to get type ID for.public Object field(Object obj, String fieldName)
field in interface IgniteCacheObjectProcessorfield in class IgniteCacheObjectProcessorImplobj - Portable object to get field from.fieldName - Field name.public boolean hasField(Object obj, String fieldName)
hasField in interface IgniteCacheObjectProcessorhasField in class IgniteCacheObjectProcessorImplobj - Object.fieldName - Field name.true if field is set.public PortableContext portableContext()
public CacheObjectContext contextForCache(CacheConfiguration cfg) throws IgniteCheckedException
contextForCache in interface IgniteCacheObjectProcessorcontextForCache in class IgniteCacheObjectProcessorImplcfg - Cache configuration.IgniteCheckedException - If failed.public byte[] marshal(CacheObjectContext ctx, Object val) throws IgniteCheckedException
marshal in interface IgniteCacheObjectProcessormarshal in class IgniteCacheObjectProcessorImplctx - Cache object context.val - Value.IgniteCheckedException - If failed.public Object unmarshal(CacheObjectContext ctx, byte[] bytes, ClassLoader clsLdr) throws IgniteCheckedException
unmarshal in interface IgniteCacheObjectProcessorunmarshal in class IgniteCacheObjectProcessorImplctx - Context.bytes - Bytes.clsLdr - Class loader.IgniteCheckedException - If failed.public KeyCacheObject toCacheKeyObject(CacheObjectContext ctx, Object obj, boolean userObj)
toCacheKeyObject in interface IgniteCacheObjectProcessortoCacheKeyObject in class IgniteCacheObjectProcessorImplctx - Cache context.obj - Key value.userObj - If true then given object is object provided by user and should be copied
before stored in cache.@Nullable public CacheObject toCacheObject(CacheObjectContext ctx, @Nullable Object obj, boolean userObj)
toCacheObject in interface IgniteCacheObjectProcessortoCacheObject in class IgniteCacheObjectProcessorImplctx - Cache context.obj - Object.userObj - If true then given object is object provided by user and should be copied
before stored in cache.public CacheObject toCacheObject(CacheObjectContext ctx, byte type, byte[] bytes)
toCacheObject in interface IgniteCacheObjectProcessortoCacheObject in class IgniteCacheObjectProcessorImplctx - Cache context.type - Object type.bytes - Object bytes.public CacheObject toCacheObject(GridCacheContext ctx, long valPtr, boolean tmp) throws IgniteCheckedException
toCacheObject in interface IgniteCacheObjectProcessortoCacheObject in class IgniteCacheObjectProcessorImplctx - Context.valPtr - Value pointer.tmp - If true can return temporary instance which is valid while entry lock is held.IgniteCheckedException - If failed.public Object unwrapTemporary(GridCacheContext ctx, Object obj) throws BinaryObjectException
unwrapTemporary in interface IgniteCacheObjectProcessorunwrapTemporary in class IgniteCacheObjectProcessorImplctx - Context.obj - Object.BinaryObjectException@Nullable public Object toPortable(@Nullable Object obj) throws IgniteException
obj - Object.IgniteException - In case of error.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.0-b1 Release Date : December 1 2015