T
- the class of objects stored in this storagepublic interface LongStorage<T> extends Storage<T>
Modifier and Type | Method and Description |
---|---|
T |
read(long address)
Reads the object stored at the specified address in this storage.
|
void |
remove(long address)
Removes the object stored at the specified address in this storage.
|
void |
rewrite(T object,
long address)
Stores given object to a given address where an object was already stored (typically the
same object was stored there and now it's being updated).
|
LongAddress<T> |
store(T object)
Stores an object in this storage.
|
LongAddress<T> store(T object) throws BucketStorageException
Storage
store
in interface Storage<T>
object
- the object to storeBucketStorageException
- if there was an error writing the dataT read(long address) throws BucketStorageException
address
- the address of the object to readBucketStorageException
- if there was an error reading the datavoid rewrite(T object, long address) throws BucketStorageException, java.lang.IllegalArgumentException
object
- the object to storeaddress
- the address where to store the objectBucketStorageException
- if there was an error reading the datajava.lang.IllegalArgumentException
- if the binary size of the passed object differs from the space in the storagevoid remove(long address) throws BucketStorageException, java.lang.UnsupportedOperationException
address
- the address of the object to removeBucketStorageException
- if there was an error deleting an objectjava.lang.UnsupportedOperationException
- if this storage does not support removal of objects