public class WriteManager extends java.lang.Object implements OutgoingEntryReceiver, PeriodicRunnable
IncomingEntryReceiver
that buffers transactions and then and then dispatches them to a flushable transaction receiver that is periodically offered all queued transaction and then flushedNULL
Constructor and Description |
---|
WriteManager(FlushableOutgoingEntryReceiver receiver,
NTThreadManager threadManager,
AbstractNetworkTableEntryStore entryStore,
long keepAliveDelay)
Create a new Write manager
|
Modifier and Type | Method and Description |
---|---|
void |
offerOutgoingAssignment(NetworkTableEntry entry) |
void |
offerOutgoingUpdate(NetworkTableEntry entry) |
void |
run()
the periodic method that sends all buffered transactions
|
void |
start()
start the write thread
|
void |
stop()
stop the write thread
|
public WriteManager(FlushableOutgoingEntryReceiver receiver, NTThreadManager threadManager, AbstractNetworkTableEntryStore entryStore, long keepAliveDelay)
receiver
- threadManager
- transactionPool
- entryStore
- public void start()
public void stop()
public void offerOutgoingAssignment(NetworkTableEntry entry)
offerOutgoingAssignment
in interface OutgoingEntryReceiver
public void offerOutgoingUpdate(NetworkTableEntry entry)
offerOutgoingUpdate
in interface OutgoingEntryReceiver
public void run() throws java.lang.InterruptedException
run
in interface PeriodicRunnable
java.lang.InterruptedException
- thrown when the thread is supposed to be interrupted and stop (implementers should always let this exception fall through)