Package org.yamcs.commanding
Class CommandQueue
- java.lang.Object
-
- org.yamcs.commanding.CommandQueue
-
public class CommandQueue extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(PreparedCommand pc)voidaddGroups(Collection<String> groups)voidaddUsers(Collection<String> users)voidclear(boolean areSent)booleancontains(PreparedCommand pc)PreparedCommand[]getCommandArray()intgetCommandCount()ConcurrentLinkedQueue<PreparedCommand>getCommands()Set<String>getGroups()Significance.LevelsgetMinLevel()StringgetName()intgetNbRejectedCommands()intgetNbSentCommands()ProcessorgetProcessor()org.yamcs.protobuf.Commanding.QueueStategetState()intgetStateExpirationRemainingS()Set<String>getUsers()booleanmatches(User user, PreparedCommand pc)booleanremove(PreparedCommand pc, boolean isSent)remove the command from the queue and return true if it has been removedvoidsetMinLevel(Significance.Levels minLevel)
-
-
-
Method Detail
-
getCommands
public ConcurrentLinkedQueue<PreparedCommand> getCommands()
-
getName
public String getName()
-
getMinLevel
public Significance.Levels getMinLevel()
-
setMinLevel
public void setMinLevel(Significance.Levels minLevel)
-
addUsers
public void addUsers(Collection<String> users)
-
addGroups
public void addGroups(Collection<String> groups)
-
matches
public boolean matches(User user, PreparedCommand pc)
-
getState
public org.yamcs.protobuf.Commanding.QueueState getState()
-
getProcessor
public Processor getProcessor()
-
getCommandArray
public PreparedCommand[] getCommandArray()
-
getCommandCount
public int getCommandCount()
-
contains
public boolean contains(PreparedCommand pc)
-
add
public void add(PreparedCommand pc)
-
remove
public boolean remove(PreparedCommand pc, boolean isSent)
remove the command from the queue and return true if it has been removed- Parameters:
pc-isSent- : true if the command has been sent, false if the command has been rejected- Returns:
-
clear
public void clear(boolean areSent)
-
getNbRejectedCommands
public int getNbRejectedCommands()
-
getStateExpirationRemainingS
public int getStateExpirationRemainingS()
-
getNbSentCommands
public int getNbSentCommands()
-
-