webfunds.client
Class MultiStoreStore

java.lang.Object
  |
  +--webfunds.store.Store
        |
        +--webfunds.client.MultiStoreStore

public class MultiStoreStore
extends Store


Field Summary
protected  java.lang.String name
           
protected  Store one
           
protected  Store two
           
 
Fields inherited from class webfunds.store.Store
APPEND, changed, error, hash, name, NET, SOMETHING
 
Constructor Summary
MultiStoreStore(Store one, Store two)
           
 
Method Summary
 void clear()
          Remove all?
 boolean contains(java.lang.Object value)
           
 boolean containsKey(java.lang.Object key)
           
 java.util.Enumeration elements()
           
protected  Store findStore(java.lang.String name, Store[] stores)
           
 java.lang.Object get(java.lang.Object key)
           
 java.lang.String getName()
           
 Store getStore(java.lang.String storename, int flags)
           
 Store[] getStores()
           
 boolean isChanged()
           
 boolean isEmpty()
           
 java.util.Enumeration keys()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Caller's responsibility to ensure that the value really needs saving.
 java.lang.Object remove(java.lang.Object key)
           
 int size()
           
protected  void sync()
          Some way to sync to disk.
 
Methods inherited from class webfunds.store.Store
checkErrors, getClassLoader, getStore, getType, setChanged, setClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

one

protected Store one

two

protected Store two
Constructor Detail

MultiStoreStore

public MultiStoreStore(Store one,
                       Store two)
Method Detail

getStore

public Store getStore(java.lang.String storename,
                      int flags)
               throws StoreException
Overrides:
getStore in class Store

getStores

public Store[] getStores()
                  throws StoreException
Overrides:
getStores in class Store

getName

public java.lang.String getName()
Overrides:
getName in class Store

clear

public void clear()
Description copied from class: Store
Remove all?
Overrides:
clear in class Store

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Description copied from class: Store
Caller's responsibility to ensure that the value really needs saving. As we mostly deal in copied refs of the Object rather than copies of the Object, it is the caller's responsibility to ensure that it needs put'ing. There is no support for copies getting out of sync within separate threads. It would be up to each application to ensure that only one Object is shared, and that changes to it are internally syncronised.
Overrides:
put in class Store

remove

public java.lang.Object remove(java.lang.Object key)
Overrides:
remove in class Store

size

public int size()
Overrides:
size in class Store

isChanged

public boolean isChanged()
Overrides:
isChanged in class Store

isEmpty

public boolean isEmpty()
Overrides:
isEmpty in class Store

keys

public java.util.Enumeration keys()
Overrides:
keys in class Store

elements

public java.util.Enumeration elements()
Overrides:
elements in class Store

contains

public boolean contains(java.lang.Object value)
Overrides:
contains in class Store

containsKey

public boolean containsKey(java.lang.Object key)
Overrides:
containsKey in class Store

get

public java.lang.Object get(java.lang.Object key)
Overrides:
get in class Store

findStore

protected Store findStore(java.lang.String name,
                          Store[] stores)

sync

protected void sync()
Description copied from class: Store
Some way to sync to disk. This might be ignored by the extending store?
Overrides:
sync in class Store