Interface CacheObjectValueContext
-
public interface CacheObjectValueContextContext to get value of cache object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanaddDeploymentInfo()BinaryContextbinaryContext()booleanbinaryEnabled()@Nullable ClassLoaderclassLoader()booleancopyOnGet()ClassLoaderglobalLoader()Gets distributed class loader.booleanisPeerClassLoadingEnabled()IgniteLoggerlog(Class<?> cls)byte[]marshal(Object val)byte[]restoreIfNecessary(byte[] bytes)Restores transformed bytes if necessary.booleanstoreValue()default byte[]transformIfNecessary(byte[] bytes)Transforms bytes according toCacheObjectTransformerProcessorwhen specified.byte[]transformIfNecessary(byte[] bytes, int offset, int length)Transforms bytes according toCacheObjectTransformerProcessorwhen specified.Objectunmarshal(byte[] bytes, ClassLoader clsLdr)voidwaitMetadataWriteIfNeeded(int typeId)Forces caller thread to wait for binary metadata write operation for given type ID.
-
-
-
Method Detail
-
copyOnGet
boolean copyOnGet()
- Returns:
- Copy on get flag.
-
storeValue
boolean storeValue()
- Returns:
Trueif should store unmarshalled value in cache.
-
addDeploymentInfo
boolean addDeploymentInfo()
- Returns:
Trueif deployment info should be associated with the objects of this cache.
-
binaryEnabled
boolean binaryEnabled()
- Returns:
- Binary enabled flag.
-
binaryContext
BinaryContext binaryContext()
- Returns:
- Binary context.
-
waitMetadataWriteIfNeeded
void waitMetadataWriteIfNeeded(int typeId)
Forces caller thread to wait for binary metadata write operation for given type ID. In case of in-memory mode this method becomes a No-op as no binary metadata is written to disk in this mode.- Parameters:
typeId- ID of binary type to wait for metadata write operation.
-
classLoader
@Nullable @Nullable ClassLoader classLoader()
- Returns:
- User's class loader.
-
globalLoader
ClassLoader globalLoader()
Gets distributed class loader.- Returns:
- Cache class loader.
-
log
IgniteLogger log(Class<?> cls)
- Parameters:
cls- Class- Returns:
- Logger for class.
-
marshal
byte[] marshal(Object val) throws IgniteCheckedException
- Parameters:
val- Value.- Returns:
- Value bytes.
- Throws:
IgniteCheckedException- If failed.
-
unmarshal
Object unmarshal(byte[] bytes, ClassLoader clsLdr) throws IgniteCheckedException
- Parameters:
bytes- Bytes.clsLdr- Class loader.- Returns:
- Unmarshalled object.
- Throws:
IgniteCheckedException- If failed.
-
isPeerClassLoadingEnabled
boolean isPeerClassLoadingEnabled()
- Returns:
trueif peer class loading is enabled,falseotherwise.
-
transformIfNecessary
default byte[] transformIfNecessary(byte[] bytes)
Transforms bytes according toCacheObjectTransformerProcessorwhen specified.- Parameters:
bytes- Given bytes.- Returns:
- Transformed bytes.
-
transformIfNecessary
byte[] transformIfNecessary(byte[] bytes, int offset, int length)Transforms bytes according toCacheObjectTransformerProcessorwhen specified.- Parameters:
bytes- Given bytes.offset- Index to start from.length- Data length.- Returns:
- Transformed bytes.
-
restoreIfNecessary
byte[] restoreIfNecessary(byte[] bytes)
Restores transformed bytes if necessary.- Parameters:
bytes- Given bytes.- Returns:
- Restored bytes.
-
-