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

## org.mule.api.store
Interface ObjectStore<T extends Serializable>

All Known Implementing Classes:
  AbstractMonitoredObjectStore, InMemoryObjectStore, TextFileObjectStore

    public interface ObjectStore<T extends Serializable>

Method Summary
`boolean` | `contains(Serializable key)` Check whether the given Object is already registered with this store.
`T` | `remove(Serializable key)` Remove the object with key.
`T` | `retrieve(Serializable key)` Retrieve the given Object.
`void` | `store(Serializable key, T value)` Store the given Object.

Method Detail

### contains

    boolean contains(Serializable key)
                     throws ObjectStoreException

  Check whether the given Object is already registered with this store.

  Parameters:
    `key` - the identifier of the object to check
  Returns:
    `true` if the key is stored or `false` no value was stored for the key.
  Throws:
    `ObjectStoreException` - if the given key is `null`.
    `ObjectStoreNotAvaliableException` - if any implementation-specific error occured, e.g. when the store is not available

### store

    void store(Serializable key,
               T value)
               throws ObjectStoreException

  Store the given Object.

  Parameters:
    `key` - the identifier for `value`
    `value` - the Object to store with `key`
  Throws:
    `ObjectStoreException` - if the given key cannot be stored or is `null`.
    `ObjectStoreNotAvaliableException` - if the store is not available or any other implementation-specific error occured.
    `ObjectAlreadyExistsException` - if an attempt is made to store an object for a key that already has an object associated.

### retrieve

    T retrieve(Serializable key)
                                    throws ObjectStoreException

  Retrieve the given Object.

  Parameters:
    `key` - the identifier of the object to retrieve.
  Returns:
    the object associated with the given key. If no object for the given key was found this method throws an `ObjectDoesNotExistException`.
  Throws:
    `ObjectStoreException` - if the given key is `null`.
    `ObjectStoreNotAvaliableException` - if the store is not available or any other implementation-specific error occured.
    `ObjectDoesNotExistException` - if no value for the given key was previously stored.

### remove

    T remove(Serializable key)
                                  throws ObjectStoreException

  Remove the object with key.

  Parameters:
    `key` - the identifier of the object to remove.
  Returns:
    the object that was previously stored for the given key
  Throws:
    `ObjectStoreException` - if the given key is `null` or if the store is not available or any other implementation-specific error occured
    `ObjectDoesNotExistException` - if no value for the given key was previously stored.

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

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.