public class CacheObjectPortableProcessorImpl extends IgniteCacheObjectProcessorImpl implements CacheObjectPortableProcessor
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static String[] |
FIELD_TYPE_NAMES |
ctx, log| Constructor and Description |
|---|
CacheObjectPortableProcessorImpl(GridKernalContext ctx) |
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 static final String[] FIELD_TYPE_NAMES
public CacheObjectPortableProcessorImpl(GridKernalContext ctx)
ctx - Kernal context.public static int fieldTypeId(String typeName)
typeName - Field type name.public static String fieldTypeName(int typeId)
typeId - Field type ID.public static Map<String,String> fieldTypeNames(Map<String,Integer> typeIds)
typeIds - Field type IDs.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 PortableException
obj - Object.PortableException - If failed.public Object unmarshal(long ptr, boolean forceHeap) throws PortableException
ptr - Off-heap pointer.forceHeap - If true creates heap-based object.PortableException - If failed.public Object marshalToPortable(@Nullable Object obj) throws PortableException
marshalToPortable in interface CacheObjectPortableProcessorobj - Original object.PortableExceptionpublic GridPortableMarshaller marshaller()
public PortableBuilder builder(int typeId)
builder in interface CacheObjectPortableProcessortypeId - Type ID.public PortableBuilder builder(String clsName)
builder in interface CacheObjectPortableProcessorclsName - Class name.public PortableBuilder builder(PortableObject portableObj)
builder in interface CacheObjectPortableProcessorportableObj - Portable object to edit.public void updateMetaData(int typeId,
String typeName,
@Nullable
String affKeyFieldName,
Map<String,Integer> fieldTypeIds)
throws PortableException
updateMetaData in interface CacheObjectPortableProcessortypeId - Type ID.typeName - Type name.affKeyFieldName - Affinity key field name.fieldTypeIds - Fields map.PortableExceptionpublic void addMeta(int typeId,
PortableMetadata newMeta)
throws PortableException
addMeta in interface CacheObjectPortableProcessortypeId - Type ID.newMeta - New meta data.PortableException@Nullable public PortableMetadata metadata(int typeId) throws PortableException
metadata in interface CacheObjectPortableProcessortypeId - Type ID.PortableExceptionpublic Map<Integer,PortableMetadata> metadata(Collection<Integer> typeIds) throws PortableException
metadata in interface CacheObjectPortableProcessortypeIds - Type ID.PortableExceptionpublic Collection<PortableMetadata> metadata() throws PortableException
metadata in interface CacheObjectPortableProcessorPortableExceptionpublic IgnitePortables portables() throws IgniteException
portables in interface CacheObjectPortableProcessorIgniteException - 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(PortableObject 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 PortableException
unwrapTemporary in interface IgniteCacheObjectProcessorunwrapTemporary in class IgniteCacheObjectProcessorImplctx - Context.obj - Object.PortableException@Nullable public Object toPortable(@Nullable Object obj) throws IgniteException
obj - Object.IgniteException - In case of error.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015