|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.nio.serialization.DefaultData
public final class DefaultData
| Constructor Summary | |
|---|---|
DefaultData()
|
|
DefaultData(int type,
byte[] data)
|
|
DefaultData(int type,
byte[] data,
int partitionHash)
|
|
DefaultData(int type,
byte[] data,
int partitionHash,
byte[] header)
|
|
| Method Summary | |
|---|---|
int |
dataSize()
Returns size of binary data |
boolean |
equals(Object o)
|
byte[] |
getData()
Returns byte array representation of internal binary format. |
byte[] |
getHeader()
Returns byte array representation of header. |
int |
getHeapCost()
Returns approximate heap cost of this Data object in bytes. |
int |
getPartitionHash()
Returns partition hash calculated for serialized object. |
int |
getType()
Returns serialization type of binary form. |
long |
hash64()
Returns 64-bit hash code for this Data object. |
int |
hashCode()
|
boolean |
hasPartitionHash()
Returns true if Data has partition hash, false otherwise. |
int |
headerSize()
Returns size of header. |
boolean |
isPortable()
Returns true if this Data is created from a Portable object,
false otherwise. |
int |
readIntHeader(int offset,
ByteOrder order)
Reads an integer header from given offset using given ByteOrder. |
void |
setData(byte[] array)
|
void |
setHeader(byte[] header)
|
void |
setPartitionHash(int partitionHash)
|
void |
setType(int type)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultData()
public DefaultData(int type,
byte[] data)
public DefaultData(int type,
byte[] data,
int partitionHash)
public DefaultData(int type,
byte[] data,
int partitionHash,
byte[] header)
| Method Detail |
|---|
public int dataSize()
Data
public int getPartitionHash()
DataPartitioningStrategy during serialization.
If partition hash is not set then standard hashCode() is used.
PartitionAware,
PartitioningStrategy,
SerializationService.toData(Object, com.hazelcast.core.PartitioningStrategy)public boolean hasPartitionHash()
Data
public int headerSize()
Data
public byte[] getHeader()
Data
public byte[] getData()
Data
public void setData(byte[] array)
public void setPartitionHash(int partitionHash)
public int getType()
DataSerializer.getTypeId()
public void setType(int type)
public void setHeader(byte[] header)
public int readIntHeader(int offset,
ByteOrder order)
Data
offset - offset of integer headerorder - byte order
public int getHeapCost()
Data
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic long hash64()
Data
public boolean isPortable()
DataPortable object,
false otherwise.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||