public class DirectClassBinaryStorageAdapter extends ClassBinaryStorageAdapter
Constructor and Description |
---|
DirectClassBinaryStorageAdapter() |
Modifier and Type | Method and Description |
---|---|
Object[] |
fromBinary(SpaceTypeDescriptor typeDescriptor,
byte[] serializedFields)
Triggered when object fields need to be retrieved
|
Object |
getFieldAtIndex(SpaceTypeDescriptor typeDescriptor,
byte[] serializedFields,
int index)
Triggered when need to access a specific field
|
protected Object |
getFieldAtIndex(SpaceTypeDescriptor typeDescriptor,
GSByteArrayInputStream bis,
GSObjectInputStream in,
int index) |
Object[] |
getFieldsAtIndexes(SpaceTypeDescriptor typeDescriptor,
byte[] serializedFields,
int... indexes)
Triggered when need to access a several specific fields
|
boolean |
isDirectFieldAccessOptimized() |
byte[] |
modifyField(SpaceTypeDescriptor typeDescriptor,
byte[] serializedFields,
int index,
Object newValue)
Triggered when need to modify a on of the fields stored in a byte[]
|
byte[] |
modifyFields(SpaceTypeDescriptor typeDescriptor,
byte[] serializedFields,
Map<Integer,Object> newValues)
Triggered when need to modify a on of the fields stored in a byte[]
|
byte[] |
toBinary(SpaceTypeDescriptor typeDescriptor,
Object[] fields)
Triggered when object fields need to be be stored
|
deserialize, getDefaultValue, getName, hasValue, serialize
public byte[] toBinary(SpaceTypeDescriptor typeDescriptor, Object[] fields) throws IOException
ClassBinaryStorageAdapter
toBinary
in class ClassBinaryStorageAdapter
IOException
public Object[] fromBinary(SpaceTypeDescriptor typeDescriptor, byte[] serializedFields) throws IOException, ClassNotFoundException
ClassBinaryStorageAdapter
fromBinary
in class ClassBinaryStorageAdapter
serializedFields
- current serialized fieldsIOException
ClassNotFoundException
public Object getFieldAtIndex(SpaceTypeDescriptor typeDescriptor, byte[] serializedFields, int index) throws IOException, ClassNotFoundException
ClassBinaryStorageAdapter
getFieldAtIndex
in class ClassBinaryStorageAdapter
serializedFields
- current serialized fieldsIOException
ClassNotFoundException
public Object[] getFieldsAtIndexes(SpaceTypeDescriptor typeDescriptor, byte[] serializedFields, int... indexes) throws IOException, ClassNotFoundException
ClassBinaryStorageAdapter
getFieldsAtIndexes
in class ClassBinaryStorageAdapter
serializedFields
- current serialized fieldsIOException
ClassNotFoundException
protected Object getFieldAtIndex(SpaceTypeDescriptor typeDescriptor, GSByteArrayInputStream bis, GSObjectInputStream in, int index) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public byte[] modifyField(SpaceTypeDescriptor typeDescriptor, byte[] serializedFields, int index, Object newValue) throws IOException, ClassNotFoundException
ClassBinaryStorageAdapter
modifyField
in class ClassBinaryStorageAdapter
serializedFields
- current serialized fieldsIOException
ClassNotFoundException
public byte[] modifyFields(SpaceTypeDescriptor typeDescriptor, byte[] serializedFields, Map<Integer,Object> newValues) throws IOException, ClassNotFoundException
ClassBinaryStorageAdapter
modifyFields
in class ClassBinaryStorageAdapter
serializedFields
- current serialized fieldsnewValues
- map from index of field to its new valueIOException
ClassNotFoundException
public boolean isDirectFieldAccessOptimized()
isDirectFieldAccessOptimized
in class ClassBinaryStorageAdapter
Copyright © GigaSpaces.