|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Contextualiser
Contextualising an Invocation is colocating it and the relevant Session within the same JVM and then invoke()-ing the Invocation... Each Contextualiser contains a store of Sessions. These may be held e.g. in Memory, on Disc, in a Database, or on another Peer in the Cluster. These are arranged in a linked list. This 'Contextualiser stack' is generally arranged with the most expensive, fastest, most volatile storage (i.e. Memory) at the top, and cheapest, slowest, securest storage (e.g. Database), at the bottom. As Sessions age, they are be evicted downwards to free up valuable and scarce resources. Incoming Invocations are passed down the Contextualiser stack until they meet the relevant Session. At this point, the Session is promoted up to Memory and the Invocation is invoke()-ed in its presence. If the Invocation reaches the ClusterContextualiser without meeting its Session and its Session is found to be located elsewhere in the Cluster, then the ClusterContextualiser has the option of relocating the Session to the Invocation in the local JVM OR the Invocation to the Session in the remote JVM. The location of the invocation's contextualisation is unimportant, provided that it occurs somewhere.
Method Summary | |
---|---|
boolean |
contextualise(Invocation invocation,
java.lang.String key,
Immoter immoter,
boolean exclusiveOnly)
Contextualise the given Invocation. |
void |
findRelevantSessionNames(PartitionMapper mapper,
java.util.Map keyToSessionNames)
|
Immoter |
getDemoter(java.lang.String name,
Motable motable)
Return an immoter to the first Contextualiser below us, which would be happy to accept this Motable - in other words - would not evict() it. |
java.util.Set |
getSessionNames()
|
Immoter |
getSharedDemoter()
Return an Immoter to the first SharedContextualiser below us. |
void |
promoteToExclusive(Immoter immoter)
Pass this Immoter up to the first ExclusiveContextualiser above us, where... |
Methods inherited from interface org.codehaus.wadi.core.Lifecycle |
---|
start, stop |
Method Detail |
---|
boolean contextualise(Invocation invocation, java.lang.String key, Immoter immoter, boolean exclusiveOnly) throws InvocationException
invocation
- the Invocationkey
- the Session keyimmoter
- an Immoter that can be used to promote the Session when foundexclusiveOnly
- whether we should only look in exclusive stores, or descend to shared ones as well
InvocationException
Immoter getDemoter(java.lang.String name, Motable motable)
name
- - uid of the Motablemotable
- - the Motable in question
Immoter getSharedDemoter()
void promoteToExclusive(Immoter immoter)
immoter
- the Immotervoid findRelevantSessionNames(PartitionMapper mapper, java.util.Map keyToSessionNames)
java.util.Set getSessionNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |