Class UserCacheObjectByteArrayImpl
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.CacheObjectByteArrayImpl
-
- org.apache.ignite.internal.processors.cacheobject.UserCacheObjectByteArrayImpl
-
- All Implemented Interfaces:
Externalizable,Serializable,CacheObject,Message
public class UserCacheObjectByteArrayImpl extends CacheObjectByteArrayImpl
Wraps value provided by user, must be copied before stored in cache.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.CacheObjectByteArrayImpl
val
-
Fields inherited from interface org.apache.ignite.internal.processors.cache.CacheObject
TYPE_BINARY, TYPE_BINARY_ENUM, TYPE_BYTE_ARR, TYPE_REGULAR
-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description UserCacheObjectByteArrayImpl()UserCacheObjectByteArrayImpl(byte[] val)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CacheObjectprepareForCache(CacheObjectContext ctx)Prepares cache object for cache (e.g. copies user-provided object if needed).<T> Tvalue(CacheObjectValueContext ctx, boolean cpy)<T> Tvalue(CacheObjectValueContext ctx, boolean cpy, ClassLoader ldr)Deserializes a value from an internal representation.-
Methods inherited from class org.apache.ignite.internal.processors.cache.CacheObjectByteArrayImpl
cacheObjectType, directType, fieldsCount, finishUnmarshal, isPlatformType, onAckReceived, prepareMarshal, putValue, putValue, putValue, readExternal, readFrom, toString, valueBytes, valueBytesLength, writeExternal, writeTo
-
-
-
-
Method Detail
-
value
@Nullable public <T> T value(CacheObjectValueContext ctx, boolean cpy)
- Specified by:
valuein interfaceCacheObject- Overrides:
valuein classCacheObjectByteArrayImpl- Parameters:
ctx- Context.cpy- Iftrueneed to copy value.- Returns:
- Value.
-
value
@Nullable public <T> T value(CacheObjectValueContext ctx, boolean cpy, ClassLoader ldr)
Deserializes a value from an internal representation.- Specified by:
valuein interfaceCacheObject- Overrides:
valuein classCacheObjectByteArrayImpl- Parameters:
ctx- Context.cpy- Iftrueneed to copy value.ldr- Class loader, if it isnull, default class loader will be used.- Returns:
- Value.
-
prepareForCache
public CacheObject prepareForCache(CacheObjectContext ctx)
Prepares cache object for cache (e.g. copies user-provided object if needed).- Specified by:
prepareForCachein interfaceCacheObject- Overrides:
prepareForCachein classCacheObjectByteArrayImpl- Parameters:
ctx- Cache context.- Returns:
- Instance to store in cache.
-
-