private static class ClientTracker.OperationQueue
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Collection |
opList_ |
private java.util.Timer |
tidyTimer_ |
Constructor and Description |
---|
OperationQueue()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ClientTracker.ClientOperation op)
Add a new client operation which may get the opportunity to be
performed some time in the future.
|
void |
apply(ClientTracker.TrackedClient client)
Apply any pending operations to given client.
|
void |
clear()
Removes all entries from this queue.
|
void |
discard(ClientTracker.TrackedClient client)
Discards any operations corresponding to a given client,
presumably because the client is about to disappear.
|
void |
discardOld(long maxAge)
Throws away any pending operations which are older than a certain
age, presumably in the expectation that their client will never
register.
|
ClientTracker.ClientOperation[] |
getOperations()
Returns an array containing all the operations currently pending.
|
private final java.util.Collection opList_
private java.util.Timer tidyTimer_
public void add(ClientTracker.ClientOperation op)
op
- oeration to addpublic void apply(ClientTracker.TrackedClient client)
client
- client to apply pending operations topublic void discard(ClientTracker.TrackedClient client)
client
- client to forget aboutpublic void discardOld(long maxAge)
maxAge
- oldest operations (in milliseconds) permitted to
remain in the queuepublic void clear()
public ClientTracker.ClientOperation[] getOperations()