org.xorm.datastore.heap
Class HeapDatastore

java.lang.Object
  |
  +--org.xorm.datastore.heap.HeapDatastore
All Implemented Interfaces:
Configurable, DataCache

public class HeapDatastore
extends Object
implements DataCache

Provides an in-memory database.


Constructor Summary
HeapDatastore()
           
 
Method Summary
 void add(Row row)
          Adds or replaces the Row in the cache.
 Row get(Table table, Object primaryKey)
          Retrieves the Row from the cache with the matching primary key.
 void remove(Row row)
          Removes a Row from the cache by its primary key.
 void setFactory(InterfaceManagerFactory factory)
           
 void setProperties(Properties props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeapDatastore

public HeapDatastore()
Method Detail

setProperties

public void setProperties(Properties props)
Specified by:
setProperties in interface Configurable

setFactory

public void setFactory(InterfaceManagerFactory factory)
Specified by:
setFactory in interface Configurable

add

public void add(Row row)
Description copied from interface: DataCache
Adds or replaces the Row in the cache. If the Table does not have a primary key defined, the implementation is not required to cache it.

Specified by:
add in interface DataCache

remove

public void remove(Row row)
Description copied from interface: DataCache
Removes a Row from the cache by its primary key. If no matching row exists, no change is made. Implementations of this method should use the .equals() operator for Row comparisons.

Specified by:
remove in interface DataCache

get

public Row get(Table table,
               Object primaryKey)
Description copied from interface: DataCache
Retrieves the Row from the cache with the matching primary key.

Specified by:
get in interface DataCache
Returns:
a row matching the criteria, or null


$Header: /cvsroot/xorm/xorm/docs/api/org/xorm/datastore/heap/HeapDatastore.html,v 1.1 2004/05/30 08:55:05 wbiggs Exp $