public interface IgniteCacheObjectProcessor extends GridProcessor
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Method and Description |
|---|---|
void |
addMeta(int typeId,
BinaryType newMeta,
boolean failIfUnregistered) |
void |
addMetaLocally(int typeId,
BinaryType newMeta)
Adds metadata locally without triggering discovery exchange.
|
IgniteBinary |
binary() |
BinaryObject |
buildEnum(String typeName,
int ord) |
BinaryObject |
buildEnum(String typeName,
String name) |
BinaryObjectBuilder |
builder(BinaryObject binaryObj)
Creates builder initialized by existing binary object.
|
BinaryObjectBuilder |
builder(String clsName) |
CacheObjectContext |
contextForCache(CacheConfiguration ccfg) |
Object |
field(Object obj,
String fieldName) |
boolean |
hasField(Object obj,
String fieldName)
Checks whether field is set in the object.
|
boolean |
immutable(Object obj) |
boolean |
isBinaryEnabled(CacheConfiguration<?,?> ccfg)
Checks whether given class is binary.
|
boolean |
isBinaryObject(Object obj)
Checks whether object is binary object.
|
byte[] |
marshal(CacheObjectValueContext ctx,
Object val) |
Object |
marshalToBinary(Object obj,
boolean failIfUnregistered) |
Collection<BinaryType> |
metadata() |
Map<Integer,BinaryType> |
metadata(Collection<Integer> typeIds) |
@Nullable BinaryType |
metadata(int typeId) |
@Nullable BinaryType |
metadata(int typeId,
int schemaId) |
void |
onContinuousProcessorStarted(GridKernalContext ctx) |
@Nullable CacheObject |
prepareForCache(@Nullable CacheObject obj,
GridCacheContext cctx)
Prepares cache object for cache (e.g. copies user-provided object if needed).
|
BinaryType |
registerEnum(String typeName,
Map<String,Integer> vals)
Register enum type
|
KeyCacheObject |
toCacheKeyObject(CacheObjectContext ctx,
@Nullable GridCacheContext cctx,
Object obj,
boolean userObj) |
CacheObject |
toCacheObject(CacheObjectContext ctx,
ByteBuffer buf) |
IncompleteCacheObject |
toCacheObject(CacheObjectContext ctx,
ByteBuffer buf,
@Nullable IncompleteCacheObject incompleteObj) |
CacheObject |
toCacheObject(CacheObjectContext ctx,
byte type,
byte[] bytes) |
@Nullable CacheObject |
toCacheObject(CacheObjectContext ctx,
@Nullable Object obj,
boolean userObj) |
@Nullable CacheObject |
toCacheObject(CacheObjectContext ctx,
@Nullable Object obj,
boolean userObj,
boolean failIfUnregistered) |
IncompleteCacheObject |
toKeyCacheObject(CacheObjectContext ctx,
ByteBuffer buf,
@Nullable IncompleteCacheObject incompleteObj) |
KeyCacheObject |
toKeyCacheObject(CacheObjectContext ctx,
byte type,
byte[] bytes) |
int |
typeId(Object obj) |
int |
typeId(String typeName) |
Object |
unmarshal(CacheObjectValueContext ctx,
byte[] bytes,
ClassLoader clsLdr) |
@Nullable Object |
unwrapTemporary(GridCacheContext ctx,
@Nullable Object obj)
Converts temporary off-heap object to heap-based.
|
void |
updateMetadata(int typeId,
String typeName,
@Nullable String affKeyFieldName,
Map<String,BinaryFieldMetadata> fieldTypeIds,
boolean isEnum,
@Nullable Map<String,Integer> enumMap) |
collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stop, validateNode, validateNodevoid onContinuousProcessorStarted(GridKernalContext ctx) throws IgniteCheckedException
ctx - Context.IgniteCheckedException - If failed.int typeId(String typeName)
typeName - Type name.int typeId(Object obj)
obj - Object to get type ID for.@Nullable @Nullable Object unwrapTemporary(GridCacheContext ctx, @Nullable @Nullable Object obj) throws IgniteException
ctx - Context.obj - Object.IgniteException - In case of error.@Nullable @Nullable CacheObject prepareForCache(@Nullable @Nullable CacheObject obj, GridCacheContext cctx)
obj - Cache object.cctx - Cache context.boolean isBinaryObject(Object obj)
obj - Object to check.True if object is already a binary object, false otherwise.boolean isBinaryEnabled(CacheConfiguration<?,?> ccfg)
true If binary objects are enabled.Object field(Object obj, String fieldName)
obj - Binary object to get field from.fieldName - Field name.boolean hasField(Object obj, String fieldName)
obj - Object.fieldName - Field name.true if field is set.byte[] marshal(CacheObjectValueContext ctx, Object val) throws IgniteCheckedException
ctx - Cache object context.val - Value.IgniteCheckedException - If failed.Object unmarshal(CacheObjectValueContext ctx, byte[] bytes, ClassLoader clsLdr) throws IgniteCheckedException
ctx - Context.bytes - Bytes.clsLdr - Class loader.IgniteCheckedException - If failed.CacheObjectContext contextForCache(CacheConfiguration ccfg) throws IgniteCheckedException
ccfg - Cache configuration.IgniteCheckedException - If failed.KeyCacheObject toCacheKeyObject(CacheObjectContext ctx, @Nullable @Nullable GridCacheContext cctx, Object obj, boolean userObj)
ctx - Cache objects context.cctx - Cache context if cache is available.obj - Key value.userObj - If true then given object is object provided by user and should be copied
before stored in cache.@Nullable @Nullable CacheObject toCacheObject(CacheObjectContext ctx, @Nullable @Nullable Object obj, boolean userObj)
ctx - Cache context.obj - Object.userObj - If true then given object is object provided by user and should be copied
before stored in cache.@Nullable @Nullable CacheObject toCacheObject(CacheObjectContext ctx, @Nullable @Nullable Object obj, boolean userObj, boolean failIfUnregistered)
ctx - Cache context.obj - Object.userObj - If true then given object is object provided by user and should be copied
before stored in cache.failIfUnregistered - Throw exception if class isn't registered.CacheObject toCacheObject(CacheObjectContext ctx, byte type, byte[] bytes)
ctx - Cache context.type - Object type.bytes - Object bytes.KeyCacheObject toKeyCacheObject(CacheObjectContext ctx, byte type, byte[] bytes) throws IgniteCheckedException
ctx - Cache context.type - Object type.bytes - Object bytes.IgniteCheckedExceptionCacheObject toCacheObject(CacheObjectContext ctx, ByteBuffer buf)
ctx - Cache context.buf - Buffer to read from.IncompleteCacheObject toCacheObject(CacheObjectContext ctx, ByteBuffer buf, @Nullable @Nullable IncompleteCacheObject incompleteObj) throws IgniteCheckedException
ctx - Cache object context.buf - Buffer.incompleteObj - Incomplete cache object or null if it's a first read.IgniteCheckedException - If fail.IncompleteCacheObject toKeyCacheObject(CacheObjectContext ctx, ByteBuffer buf, @Nullable @Nullable IncompleteCacheObject incompleteObj) throws IgniteCheckedException
ctx - Cache object context.buf - Buffer.incompleteObj - Incomplete cache object or null if it's a first read.IgniteCheckedException - If fail.boolean immutable(Object obj)
obj - Value.True if object is of known immutable type.IgniteBinary binary() throws IgniteException
IgniteException - If failed.BinaryObjectBuilder builder(String clsName)
clsName - Class name.BinaryObjectBuilder builder(BinaryObject binaryObj)
binaryObj - Binary object to edit.void addMeta(int typeId,
BinaryType newMeta,
boolean failIfUnregistered)
throws IgniteException
typeId - Type ID.newMeta - New metadata.failIfUnregistered - Fail if unregistered.IgniteException - In case of error.void addMetaLocally(int typeId,
BinaryType newMeta)
throws IgniteException
typeId - Type ID.newMeta - New metadata.IgniteException - In case of error.void updateMetadata(int typeId,
String typeName,
@Nullable
@Nullable String affKeyFieldName,
Map<String,BinaryFieldMetadata> fieldTypeIds,
boolean isEnum,
@Nullable
@Nullable Map<String,Integer> enumMap)
throws IgniteException
typeId - Type ID.typeName - Type name.affKeyFieldName - Affinity key field name.fieldTypeIds - Fields map.isEnum - Enum flag.enumMap - Enum name to ordinal mapping.IgniteException - In case of error.@Nullable @Nullable BinaryType metadata(int typeId) throws IgniteException
typeId - Type ID.IgniteException - In case of error.@Nullable @Nullable BinaryType metadata(int typeId, int schemaId) throws IgniteException
typeId - Type ID.schemaId - Schema ID.IgniteException - In case of error.Map<Integer,BinaryType> metadata(Collection<Integer> typeIds) throws IgniteException
typeIds - Type ID.IgniteException - In case of error.Collection<BinaryType> metadata() throws IgniteException
IgniteException - In case of error.BinaryObject buildEnum(String typeName, int ord) throws IgniteException
typeName - Type name.ord - ordinal.IgniteException - If failed.BinaryObject buildEnum(String typeName, String name) throws IgniteException
typeName - Type name.name - Name.IgniteException - If failed.BinaryType registerEnum(String typeName, Map<String,Integer> vals) throws IgniteException
typeName - Type name.vals - Mapping of enum constant names to ordinals.IgniteExceptionObject marshalToBinary(Object obj, boolean failIfUnregistered) throws IgniteException
obj - Original object.failIfUnregistered - Throw exception if class isn't registered.IgniteException - If failed.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020