Class BinaryObjectImpl
- java.lang.Object
-
- org.apache.ignite.internal.binary.BinaryObjectImpl
-
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,BinaryObject,BinaryObjectEx,CacheObject,KeyCacheObject
public final class BinaryObjectImpl extends Object implements Externalizable, KeyCacheObject
Binary object implementation.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.apache.ignite.internal.processors.cache.CacheObject
TYPE_BINARY, TYPE_BINARY_ENUM, TYPE_BYTE_ARR, TYPE_REGULAR
-
-
Constructor Summary
Constructors Constructor Description BinaryObjectImpl()ForExternalizable.BinaryObjectImpl(BinaryContext ctx, byte[] arr, int start)
-
Method Summary
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.binary.BinaryObjectEx
array, componentClassName, componentTypeId, enumClassName, heapCopy
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.CacheObject
postWriteRequired
-
-
-
-
Constructor Detail
-
BinaryObjectImpl
public BinaryObjectImpl()
ForExternalizable.
-
BinaryObjectImpl
public BinaryObjectImpl(BinaryContext ctx, byte[] arr, int start)
- Parameters:
ctx- Context.arr- Array.start- Start.
-
-
Method Detail
-
copy
public KeyCacheObject copy(int part)
- Specified by:
copyin interfaceKeyCacheObject
-
partition
public int partition()
- Specified by:
partitionin interfaceKeyCacheObject
-
partition
public void partition(int part)
- Specified by:
partitionin interfaceKeyCacheObject
-
cacheObjectType
public byte cacheObjectType()
- Specified by:
cacheObjectTypein interfaceCacheObject
-
isPlatformType
public boolean isPlatformType()
- Specified by:
isPlatformTypein interfaceCacheObject
-
internal
public boolean internal()
- Specified by:
internalin interfaceKeyCacheObject
-
value
@Nullable public <T> T value(CacheObjectValueContext ctx, boolean cpy)
- Specified by:
valuein interfaceCacheObject
-
value
@Nullable public <T> T value(CacheObjectValueContext ctx, boolean cpy, ClassLoader ldr)
- Specified by:
valuein interfaceCacheObject
-
valueBytes
public byte[] valueBytes(CacheObjectValueContext ctx) throws IgniteCheckedException
- Specified by:
valueBytesin interfaceCacheObject- Throws:
IgniteCheckedException
-
putValue
public boolean putValue(ByteBuffer buf) throws IgniteCheckedException
- Specified by:
putValuein interfaceCacheObject- Throws:
IgniteCheckedException
-
putValue
public int putValue(long addr)
- Specified by:
putValuein interfaceCacheObject
-
putValue
public boolean putValue(ByteBuffer buf, int off, int len) throws IgniteCheckedException
- Specified by:
putValuein interfaceCacheObject- Throws:
IgniteCheckedException
-
valueBytesLength
public int valueBytesLength(CacheObjectValueContext ctx) throws IgniteCheckedException
- Specified by:
valueBytesLengthin interfaceCacheObject- Throws:
IgniteCheckedException
-
prepareForCache
public CacheObject prepareForCache(CacheObjectValueContext ctx)
- Specified by:
prepareForCachein interfaceCacheObject
-
finishUnmarshal
public void finishUnmarshal(CacheObjectValueContext ctx, ClassLoader ldr) throws IgniteCheckedException
- Specified by:
finishUnmarshalin interfaceCacheObject- Throws:
IgniteCheckedException
-
prepareMarshal
public void prepareMarshal(CacheObjectValueContext ctx)
- Specified by:
prepareMarshalin interfaceCacheObject
-
length
public int length()
-
detach
public BinaryObjectEx detach()
- Specified by:
detachin interfaceBinaryObjectEx
-
detach
public BinaryObjectImpl detach(boolean checkCrossObjReferences)
- Specified by:
detachin interfaceBinaryObjectEx
-
detached
public boolean detached()
- Returns:
- Detached or not.
-
detachAllowed
public void detachAllowed(boolean detachAllowed)
- Specified by:
detachAllowedin interfaceBinaryObjectEx
-
context
public BinaryContext context()
- Specified by:
contextin interfaceBinaryObjectEx
-
context
public void context(BinaryContext ctx)
- Parameters:
ctx- Context.
-
bytes
public byte[] bytes()
- Specified by:
bytesin interfaceBinaryObjectEx
-
start
public int start()
- Specified by:
startin interfaceBinaryObjectEx
-
offheapAddress
public long offheapAddress()
-
hasBytes
public boolean hasBytes()
- Specified by:
hasBytesin interfaceBinaryObjectEx
-
isFlagSet
public boolean isFlagSet(short flag)
- Specified by:
isFlagSetin interfaceBinaryObjectEx
-
typeId
public int typeId()
- Specified by:
typeIdin interfaceBinaryObjectEx
-
type
@Nullable public @Nullable BinaryType type() throws BinaryObjectException
- Specified by:
typein interfaceBinaryObject- Throws:
BinaryObjectException
-
rawType
@Nullable public @Nullable BinaryType rawType() throws BinaryObjectException
- Specified by:
rawTypein interfaceBinaryObjectEx- Throws:
BinaryObjectException
-
field
@Nullable public <F> F field(String fieldName) throws BinaryObjectException
- Specified by:
fieldin interfaceBinaryObject- Throws:
BinaryObjectException
-
field
@Nullable public <F> F field(int fieldId) throws BinaryObjectException- Throws:
BinaryObjectException
-
dataStartOffset
public int dataStartOffset()
-
footerStartOffset
public int footerStartOffset()
-
fieldByOrder
@Nullable public <F> F fieldByOrder(int order)
-
writeFieldByOrder
public boolean writeFieldByOrder(int order, ByteBuffer buf)
-
field
@Nullable protected <F> F field(org.apache.ignite.internal.binary.BinaryReaderHandles rCtx, String fieldName)
-
hasField
public boolean hasField(String fieldName)
- Specified by:
hasFieldin interfaceBinaryObject
-
deserialize
@Nullable public <T> T deserialize(@Nullable @Nullable ClassLoader ldr) throws BinaryObjectException- Specified by:
deserializein interfaceBinaryObject- Throws:
BinaryObjectException
-
deserialize
@Nullable public <T> T deserialize() throws BinaryObjectException- Specified by:
deserializein interfaceBinaryObject- Throws:
BinaryObjectException
-
clone
public BinaryObject clone() throws CloneNotSupportedException
- Specified by:
clonein interfaceBinaryObject- Throws:
CloneNotSupportedException
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceKeyCacheObject- Overrides:
hashCodein classObject
-
hasSchema
public boolean hasSchema()
-
schemaId
public int schemaId()
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
size
public int size()
- Specified by:
sizein interfaceBinaryObject
-
toString
public String toString()
-
enumOrdinal
public int enumOrdinal() throws BinaryObjectException- Specified by:
enumOrdinalin interfaceBinaryObject- Throws:
BinaryObjectException
-
enumName
public String enumName() throws BinaryObjectException
- Specified by:
enumNamein interfaceBinaryObject- Throws:
BinaryObjectException
-
toBuilder
public BinaryObjectBuilder toBuilder() throws BinaryObjectException
- Specified by:
toBuilderin interfaceBinaryObject- Throws:
BinaryObjectException
-
hasCircularReferences
public boolean hasCircularReferences()
- Specified by:
hasCircularReferencesin interfaceBinaryObjectEx
-
-