T
- the class of objects that this address points topublic final class LongAddress<T> extends java.lang.Object implements Address<T>
Address
for a storage that uses long addresses.Storage
,
Serialized FormConstructor and Description |
---|
LongAddress(LongStorage<T> storage,
long address)
Creates a new instance of IntAddress on the specified int storage.
|
Modifier and Type | Method and Description |
---|---|
long |
getAddress()
Returns the associated long address into the storage.
|
T |
read()
Reads the object stored at this address from the associated storage.
|
void |
remove()
Removes the object stored at this address from the associated storage.
|
void |
rewrite(T object)
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).
|
public LongAddress(LongStorage<T> storage, long address)
storage
- the storage on which this address is validaddress
- the int address in the storage this IntAddress points topublic long getAddress()
public T read() throws BucketStorageException
Address
read
in interface Address<T>
BucketStorageException
- if there was an error reading the datapublic void remove() throws BucketStorageException, java.lang.UnsupportedOperationException
Address
remove
in interface Address<T>
BucketStorageException
- if there was an error deleting an objectjava.lang.UnsupportedOperationException
- if this storage does not support removal of objectspublic void rewrite(T object) throws BucketStorageException, java.lang.IllegalArgumentException
object
- the object to storeBucketStorageException
- if there was an error reading the datajava.lang.IllegalArgumentException
- if the binary size of the passed object differs from the space in the storage