Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.persistence
Interface Storage

All Superinterfaces:
  Catalog

All Known Subinterfaces:
  StorageManager

All Known Implementing Classes:
  MemoryStorage, PersistentStorage, StorageManagerImpl

public interface Storage
extends Catalog

This interface is the abstraction of something which provides a local storage service, such as a persistence storage service or an in-memory storage service. Two implementations are provided, the PersistentStorage and MemoryStorage, respsectively.

Version:
  $Id: pretty.settings,v 1.3 2005/03/11 20:22:33 jeffh Exp $
Author:
  jeffh

Method Summary
`void` | `store(Id id, java.io.Serializable metadata, java.io.Serializable obj, Continuation c)` Stores an object in this storage.
`void` | `unstore(Id id, Continuation c)` Removes the object from the list of stored objects.

Methods inherited from interface rice.persistence.Catalog
`exists, flush, getMetadata, getObject, getSize, getTotalSize, rename, scan, scan, scanMetadata, scanMetadata, scanMetadataValuesHead, scanMetadataValuesNull, setMetadata`

Method Detail

### store

    public void store(Id id,
                      java.io.Serializable metadata,
                      java.io.Serializable obj,
                      Continuation c)

  Stores an object in this storage. This method is non-blocking. If the object has already been stored at the location id, this method has the effect of calling `unstore(id)` followed by `store(id, obj)` . This method finishes by calling receiveResult() on the provided continuation with the success or failure of the store. Returns `True` if the action succeeds, else `False` (through receiveResult on c).

  Parameters:
    `id` - The object's id.
    `metadata` - The object's metadata
    `obj` - The object to store.
    `c` - The command to run once the operation is complete

### unstore

    public void unstore(Id id,
                        Continuation c)

  Removes the object from the list of stored objects. This method is non-blocking. If the object was not in the stored list in the first place, nothing happens and `False` is returned. Returns `True` if the action succeeds, else `False` (through receiveResult on c).

  Parameters:
    `c` - The command to run once the operation is complete
    `id` - DESCRIBE THE PARAMETER

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.