uk.ac.man.cs.rainbow.deadlock
Interface StateEngine.EntryStack

All Known Implementing Classes:
StateEngine.EntryStackEager, StateEngine.EntryStackLazy
Enclosing class:
StateEngine

public static interface StateEngine.EntryStack

Path storage mechanism spec. INTERNAL USE ONLY


Method Summary
 void advancePastEnd()
          Restore the trace to the failure point.
 int getMark()
          Get the current mark.
 StateEngine.StackEntry index(int index)
          Peek at the state at the given depth.
 int maxdepth()
          What is the maximum size of the stack?
 StateEngine.StackEntry pop()
          Pop a state off the stack.
 Integer present(StateEngine.MajorState major)
          Test for the presence of a state.
 void push(StateEngine.StackEntry se)
          Push a state onto the stack.
 void setRetainLevel(int level)
          Set the state serialization point.
 int size()
          How big is the stack?
 StateEngine.StackEntry top()
          Peek at the top-most state.
 

Method Detail

push

public void push(StateEngine.StackEntry se)
Push a state onto the stack. The state is encoded as a stack entry.

pop

public StateEngine.StackEntry pop()
Pop a state off the stack.

present

public Integer present(StateEngine.MajorState major)
Test for the presence of a state.
Returns:
The depth on the stack where the state is present, or null if the state is not present.

top

public StateEngine.StackEntry top()
Peek at the top-most state.

index

public StateEngine.StackEntry index(int index)
Peek at the state at the given depth.

size

public int size()
How big is the stack?

maxdepth

public int maxdepth()
What is the maximum size of the stack?

advancePastEnd

public void advancePastEnd()
                    throws RainbowException
Restore the trace to the failure point. Used to make backtracks more informative in the lazy case. Probably ought to be replaced by a different interface...
See Also:
StateEngine.LAZY_POP

getMark

public int getMark()
Get the current mark. Used to make backtracks more informative in the lazy case. Probably ought to be replaced by a different interface...
See Also:
StateEngine.LAZY_POP

setRetainLevel

public void setRetainLevel(int level)
Set the state serialization point.
Parameters:
level - The maximum number of values on the stack to keep hard references to. All the rest are written out to disk to decrease peak memory consumption.
See Also:
ReclaimableSavedState