public class BinaryArray extends Object implements BinaryObjectEx, Externalizable, Comparable<BinaryArray>
| Modifier and Type | Field and Description |
|---|---|
protected Object[] |
arr
Values.
|
protected @Nullable String |
compClsName
Type class name.
|
protected int |
compTypeId
Type ID.
|
protected BinaryContext |
ctx
Context.
|
protected Object[] |
deserialized
Deserialized value.
|
static boolean |
DFLT_IGNITE_USE_BINARY_ARRAYS
Default value of
IgniteSystemProperties.IGNITE_USE_BINARY_ARRAYS. |
| Constructor and Description |
|---|
BinaryArray()
Externalizable support. |
BinaryArray(BinaryContext ctx,
int compTypeId,
@Nullable String compClsName,
Object[] arr) |
| Modifier and Type | Method and Description |
|---|---|
Object[] |
array() |
BinaryObject |
clone()
Copies this binary object.
|
int |
compareTo(@NotNull BinaryArray o) |
String |
componentClassName() |
int |
componentTypeId() |
<T> T |
deserialize()
Gets fully deserialized instance of binary object.
|
<T> T |
deserialize(ClassLoader ldr)
Gets fully deserialized instance of binary object.
|
String |
enumName()
Get name for this enum object.
|
int |
enumOrdinal()
Get ordinal for this enum object.
|
boolean |
equals(Object o) |
<F> F |
field(String fieldName)
Gets field value.
|
boolean |
hasField(String fieldName)
Checks whether field exists in the object.
|
int |
hashCode() |
static void |
initUseBinaryArrays()
Initialize
USE_BINARY_ARRAYS value with
IgniteSystemProperties.IGNITE_USE_BINARY_ARRAYS system property value. |
boolean |
isFlagSet(short flag)
Check if flag set.
|
@Nullable BinaryType |
rawType()
Get raw type.
|
void |
readExternal(ObjectInput in) |
int |
size()
Get the size of the object
|
BinaryObjectBuilder |
toBuilder()
Creates a new
BinaryObjectBuilder based on this binary object. |
String |
toString() |
BinaryType |
type()
Gets type information for this binary object.
|
int |
typeId() |
static boolean |
useBinaryArrays() |
void |
writeExternal(ObjectOutput out) |
public static final boolean DFLT_IGNITE_USE_BINARY_ARRAYS
IgniteSystemProperties.IGNITE_USE_BINARY_ARRAYS.@GridToStringExclude protected BinaryContext ctx
protected int compTypeId
@Nullable protected @Nullable String compClsName
@GridToStringInclude(sensitive=true) protected Object[] arr
@GridToStringExclude protected Object[] deserialized
public BinaryArray()
Externalizable support.public BinaryArray(BinaryContext ctx, int compTypeId, @Nullable @Nullable String compClsName, Object[] arr)
ctx - Context.compTypeId - Component type id.compClsName - Component class name.arr - Array.public BinaryType type() throws BinaryObjectException
type in interface BinaryObjectBinaryObjectException - In case of error.@Nullable public @Nullable BinaryType rawType() throws BinaryObjectException
rawType in interface BinaryObjectExBinaryObjectException - If failed.public <T> T deserialize()
throws BinaryObjectException
deserialize in interface BinaryObjectT - Type of the deserialized object.BinaryInvalidTypeException - If class doesn't exist.BinaryObjectException - In case of any other error.public <T> T deserialize(ClassLoader ldr) throws BinaryObjectException
ldr was not specified, configured class loader
will be used IgniteConfiguration.getClassLoader().deserialize in interface BinaryObjectT - Type of the deserialized object.ldr - Class loader.BinaryInvalidTypeException - If class doesn't exist.BinaryObjectException - In case of any other error.public Object[] array()
public int componentTypeId()
public String componentClassName()
public BinaryObject clone() throws CloneNotSupportedException
clone in interface BinaryObjectclone in class ObjectCloneNotSupportedExceptionpublic int typeId()
typeId in interface BinaryObjectExpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic BinaryObjectBuilder toBuilder() throws BinaryObjectException
BinaryObjectBuilder based on this binary object. The following code
BinaryObjectBuilder builder = binaryObject.toBuilder();is equivalent to
BinaryObjectBuilder builder = ignite.binary().builder(binaryObject);
toBuilder in interface BinaryObjectBinaryObjectException - If builder cannot be created.public int enumOrdinal()
throws BinaryObjectException
BinaryType.isEnum() to check if object is of enum type.enumOrdinal in interface BinaryObjectBinaryObjectException - If object is not enum.public String enumName() throws BinaryObjectException
BinaryType.isEnum() to check if object is of enum type.enumName in interface BinaryObjectBinaryObjectException - If object is not enum.public int size()
size in interface BinaryObjectpublic boolean isFlagSet(short flag)
isFlagSet in interface BinaryObjectExflag - flag to check.true if flag is set, false otherwise.public <F> F field(String fieldName) throws BinaryObjectException
field in interface BinaryObjectF - Type of the field value.fieldName - Field name.BinaryObjectException - In case of any other error.public boolean hasField(String fieldName)
hasField in interface BinaryObjectfieldName - Field name.True if field exists.public int compareTo(@NotNull
@NotNull BinaryArray o)
compareTo in interface Comparable<BinaryArray>public static boolean useBinaryArrays()
True if typed arrays should be used, false otherwise.public static void initUseBinaryArrays()
USE_BINARY_ARRAYS value with
IgniteSystemProperties.IGNITE_USE_BINARY_ARRAYS system property value.
This method invoked using reflection in tests.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023