|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.spif.StoreManager
The store manager is a pluggable singleton which can be used to manage the store chain in larger applications. In systems with multiple components may be unaware of each other, and able to function in varying configurations it becomes impractical to let components set the store chain directly, but still the components should know themselves which store chains they need to function properly. The store manager may be used in such scenarios to ensure a globally sane store while still letting components influence its content.
The manager will ensure that :
The store chain manager may be subclassed to implement other store management policies, but the subclassing design is not done yet, so you'll need to change this type as well.
Constructor Summary | |
StoreManager()
Only instantiate to set(net.sf.spif.StoreManager) a new instance for all to use.
|
Method Summary | |
StoreChain |
addListening(StoreChain chain)
Requests the addition of a listening store chain. |
StoreChain |
addStoring(StoreChain chain)
Requests the addition of a storing chain object. |
StoreChain |
addVetoing(StoreChain chain)
Requests the addition of a vetoing store chain. |
static StoreManager |
get()
|
java.lang.String |
getChainString()
Returns a string enumerating all the elements of the current chain, in order |
StoreChain |
getPrevious(StoreChain chain)
Returns the store chain element appearing before the given store chain element, or null if the given chain is not in the store chain |
protected void |
handleDuplicateAddition(StoreChain duplicate)
Do type-dependent handling when a duplicate is attemted added |
void |
removeStore()
Removes everything from the store chain |
protected void |
replace(StoreChain oldChain,
StoreChain newChain)
Replaces a chain element with another |
static void |
set(StoreManager manager)
Sets the instance to use |
protected boolean |
storeChainContains(StoreChain chain)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StoreManager()
set(net.sf.spif.StoreManager)
a new instance for all to use.
Use get()
to get an instance.
Method Detail |
public static StoreManager get()
public static void set(StoreManager manager)
public StoreChain addVetoing(StoreChain chain)
public StoreChain addListening(StoreChain chain)
public StoreChain addStoring(StoreChain chain)
Requests the addition of a storing chain object. A storing chain object will deliver requests for some objects from the storage it controls
If a StoreCache
is added when one is allready present, the one
with the largest size will be used.
protected void handleDuplicateAddition(StoreChain duplicate)
protected void replace(StoreChain oldChain, StoreChain newChain)
public StoreChain getPrevious(StoreChain chain)
protected boolean storeChainContains(StoreChain chain)
public java.lang.String getChainString()
public void removeStore()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |