messif.buckets.storage
Interface Address<T>

Type Parameters:
T - the class of objects that this address points to
All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
IntAddress, LongAddress

public interface Address<T>
extends java.io.Serializable

Interface of a generic storage address. An address can be retrieved by storing an object into a Storage via the Storage.store(T) method.

See Also:
Storage

Method Summary
 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.
 

Method Detail

read

T read()
       throws BucketStorageException
Reads the object stored at this address from the associated storage.

Returns:
the object retrieved
Throws:
BucketStorageException - if there was an error reading the data

remove

void remove()
            throws BucketStorageException,
                   java.lang.UnsupportedOperationException
Removes the object stored at this address from the associated storage. This operation is optional and need not be implemented.

Throws:
BucketStorageException - if there was an error deleting an object
java.lang.UnsupportedOperationException - if this storage does not support removal of objects