Cocoon API: Interface Store

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

## org.apache.cocoon.store
Interface Store

All Known Implementing Classes:
  MemoryStore

public interface Store

This is the interface that a generic object storage system must implement.

Version:
  $Revision: 1.7 $ $Date: 2000/11/01 20:12:27 $
Author:
  Stefano Mazzocchi

Method Summary
`boolean` | `containsKey(java.lang.Object key)` Indicates if the given key is associated to a contained object.
`void` | `free()` Frees some of the fast memory used by this store.
`java.lang.Object` | `get(java.lang.Object key)` Get the object associated to the given unique key.
`long` | `getTime(java.lang.Object key)` Get the time the object was added.
`void` | `hold(java.lang.Object key, java.lang.Object value)` Holds the given object in a volatile state.
`java.util.Enumeration` | `list()` Returns the list of used keys.
`void` | `remove(java.lang.Object key)` Remove the object associated to the given key.
`void` | `store(java.lang.Object key, java.lang.Object value)` Store the given object in a persistent state.

Method Detail

### get

    public java.lang.Object get(java.lang.Object key)

  Get the object associated to the given unique key.

### getTime

    public long getTime(java.lang.Object key)

  Get the time the object was added.
  Throws:
    `java.lang.NullPointerException` - if the object is not in the store.

### store

    public void store(java.lang.Object key,
                      java.lang.Object value)

  Store the given object in a persistent state. It is up to the caller to ensure that the key has a persistent state across different JVM executions.

### hold

    public void hold(java.lang.Object key,
                     java.lang.Object value)

  Holds the given object in a volatile state. This means the object store will discard held objects if the virtual machine is restarted or some error happens.

### remove

    public void remove(java.lang.Object key)

  Remove the object associated to the given key.

### containsKey

    public boolean containsKey(java.lang.Object key)

  Indicates if the given key is associated to a contained object.

### list

    public java.util.Enumeration list()

  Returns the list of used keys.

### free

    public void free()

  Frees some of the fast memory used by this store.

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

Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.