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