Class SwapListenerBase<T extends ListenerBase>

All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable, LivenessManager, LivenessNode, LivenessReferent, ListenerBase, Serializable
Direct Known Subclasses:
ShiftAwareSwapListener, SwapListener

public abstract class SwapListenerBase<T extends ListenerBase>
extends LivenessArtifact
implements ListenerBase
Watch for ticks and when initialization is complete forward to the eventual listener. The SwapListenerBase is attached to a table so that we can listen for updates during the LTM cycle; and if any updates occur, we'll be able to notice them and retry initialization. If no ticks were received before the result is ready, then we should forward all calls to our eventual listener. Callers should use our start and end functions. The start function is called at the beginning of a data snapshot; and allows us to setup our state variables. At the end of the snapshot attempt, end() is called; and if there were no clock changes, we were not gotNotification, and no notifications were enqueued; then we have a successful snapshot and can return true. We then set the currentListener, so that all future calls are forwarded to the listener. Use either SwapListener or ShiftAwareSwapListener depending on which Listener interface you are using.
See Also:
Serialized Form