Package org.teamapps.uisession
Class CommandBuffer
- java.lang.Object
-
- org.teamapps.uisession.CommandBuffer
-
public class CommandBuffer extends java.lang.ObjectNOT THREAD-SAFE! Synchronization must be provided by using code.
-
-
Constructor Summary
Constructors Constructor Description CommandBuffer(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCommand(CMD command)voidclear()CMDconsumeCommand()intgetBufferedCommandsCount()longgetNextCommandId()intgetUnconsumedCommandsCount()voidpurgeTillCommand(int commandIdExclusive)booleanrewindToCommand(long commandId)
-
-
-
Method Detail
-
getBufferedCommandsCount
public int getBufferedCommandsCount()
-
getUnconsumedCommandsCount
public int getUnconsumedCommandsCount()
-
addCommand
public void addCommand(CMD command) throws UnconsumedCommandsOverflowException
-
consumeCommand
public CMD consumeCommand()
-
purgeTillCommand
public void purgeTillCommand(int commandIdExclusive)
-
rewindToCommand
public boolean rewindToCommand(long commandId)
-
getNextCommandId
public long getNextCommandId()
-
clear
public void clear()
-
-