public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorImpl implements CacheObjectBinaryProcessor
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static IgniteProductVersion |
BINARY_CFG_CHECK_SINCE |
ctx, 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() |
BinaryContext |
binaryContext() |
BinaryObject |
buildEnum(String typeName,
int ord) |
BinaryObjectBuilder |
builder(BinaryObject binaryObj)
Creates builder initialized by existing binary 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 |
isBinaryEnabled(CacheConfiguration<?,?> ccfg)
Checks whether given class is binary.
|
boolean |
isBinaryObject(Object obj)
Checks whether object is binary object.
|
byte[] |
marshal(CacheObjectContext ctx,
Object val) |
byte[] |
marshal(Object obj) |
GridBinaryMarshaller |
marshaller() |
Object |
marshalToBinary(Object obj) |
Collection<BinaryType> |
metadata() |
Map<Integer,BinaryType> |
metadata(Collection<Integer> typeIds) |
BinaryType |
metadata(int typeId) |
void |
onKernalStart()
Callback that notifies that kernal has successfully started,
including all managers and processors.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onUtilityCacheStarted() |
void |
start()
Starts grid component.
|
Object |
toBinary(Object obj) |
KeyCacheObject |
toCacheKeyObject(CacheObjectContext ctx,
Object obj,
boolean userObj) |
KeyCacheObject |
toCacheKeyObject(CacheObjectContext ctx,
Object obj,
boolean userObj,
int partition) |
CacheObject |
toCacheObject(CacheObjectContext ctx,
byte type,
byte[] bytes) |
CacheObject |
toCacheObject(CacheObjectContext ctx,
Object obj,
boolean userObj) |
CacheObject |
toCacheObject(GridCacheContext ctx,
long valPtr,
boolean tmp) |
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) |
IgniteNodeValidationResult |
validateNode(ClusterNode rmtNode)
Validates that new node can join grid topology, this method is called on coordinator
node before new node joins topology.
|
immutable, prepareForCache, toCacheKeyObject0, toCacheObject0assertParameter, collectDiscoveryData, discoveryDataType, onDisconnected, onDiscoveryDataReceived, onReconnected, printMemoryStats, stop, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitimmutable, prepareForCachecollectDiscoveryData, discoveryDataType, onDisconnected, onDiscoveryDataReceived, onReconnected, printMemoryStats, stoppublic static final IgniteProductVersion BINARY_CFG_CHECK_SINCE
public 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 onKernalStart()
throws IgniteCheckedException
onKernalStart in interface GridComponentonKernalStart in class GridProcessorAdapterIgniteCheckedException - Thrown in case of any errors.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 marshalToBinary(@Nullable Object obj) throws BinaryObjectException
marshalToBinary in interface CacheObjectBinaryProcessorobj - Original object.BinaryObjectExceptionpublic GridBinaryMarshaller marshaller()
public BinaryObjectBuilder builder(String clsName)
builder in interface CacheObjectBinaryProcessorclsName - Class name.public BinaryObjectBuilder builder(BinaryObject binaryObj)
builder in interface CacheObjectBinaryProcessorbinaryObj - Binary 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 isBinaryObject(Object obj)
isBinaryObject in interface IgniteCacheObjectProcessorisBinaryObject in class IgniteCacheObjectProcessorImplobj - Object to check.True if object is already a binary object, false otherwise.public boolean isBinaryEnabled(CacheConfiguration<?,?> ccfg)
isBinaryEnabled in interface IgniteCacheObjectProcessorisBinaryEnabled in class IgniteCacheObjectProcessorImpltrue If binary objects are enabled.public Object affinityKey(BinaryObject po)
po - Binary 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 - Binary 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 BinaryContext binaryContext()
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.public KeyCacheObject toCacheKeyObject(CacheObjectContext ctx, Object obj, boolean userObj, int partition)
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.partition - ID of partition this key belongs to.@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 toBinary(@Nullable Object obj) throws IgniteException
obj - Object.IgniteException - In case of error.@Nullable public IgniteNodeValidationResult validateNode(ClusterNode rmtNode)
validateNode in interface GridComponentvalidateNode in class GridProcessorAdapterrmtNode - Joining node.null in case of success.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.6.0 Release Date : May 18 2016