public abstract class BasicFlowControl extends java.lang.Object implements ProcessingInterface
datasetSend()
aufgerufen werden um den Zähler der gesendeten Daten hochzuzählen.
flowControl()
kann immer aufgerufen werden bevor ein Datensätze versendet werden würde um den Versand ggf. auszubremsen.Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicLong |
_actualDatasets
Anzahl der bisher versendeten Datensätze
|
private static Debug |
_debug |
private java.util.concurrent.atomic.AtomicLong |
_desiredDatasets
Anzahl der in voller Geschwindigkeit zu sendenden Datensätze.
|
protected long |
_maxDelay
Maximale Zeitdauer in ms für die die Protokollerstellung angehalten werden kann.
|
protected java.util.concurrent.atomic.AtomicBoolean |
_pause
Flußkontrolle.
|
private int |
_timeout
Anzahl Minuten ohne Antwort vom Client, nach der die Übertragung getrennt wird
|
private int |
_timeoutCounter
Anzahl Minuten in Folge, die der Client keine Flusskontrollnachricht geschickt hat
|
Constructor and Description |
---|
BasicFlowControl(long maxDelay,
int timeout,
long initialFlowControl)
Erzeut eine neue Instanz
|
Modifier and Type | Method and Description |
---|---|
void |
datasetSend() |
protected void |
flowControl()
Flußkontrolle.
|
void |
flowControl(long numData)
Clientseitige automatische flusskontrolle.
|
protected abstract java.lang.Object |
getClient() |
abstract long |
getJobId()
Gibt die Auftrags-Id zurück
|
int |
getTimeout() |
void |
pauseProcessing()
Versand von Protokolldatensätzen anhalten.
|
void |
resumeProcessing()
Versand von Protokolldatensätzen fortsetzen.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abort, getJobState, getProtocolId, getStatus, process, stopProtocolTransmission
private static final Debug _debug
protected final java.util.concurrent.atomic.AtomicBoolean _pause
protected final long _maxDelay
private final java.util.concurrent.atomic.AtomicLong _actualDatasets
private final java.util.concurrent.atomic.AtomicLong _desiredDatasets
private int _timeoutCounter
private int _timeout
public BasicFlowControl(long maxDelay, int timeout, long initialFlowControl)
maxDelay
- Maximale wartezeit bei manueller Flusskontrolle in mstimeout
- Anzahl Minuten ohne Antwort vom Client, nach der die Übertragung getrennt wirdinitialFlowControl
- Anzahl initial zu sendende Datensätze bis zu automatische Flusskontrolle den Versand bremstpublic void pauseProcessing()
ProcessingInterface
pauseProcessing
in interface ProcessingInterface
ProcessingInterface.pauseProcessing()
public void resumeProcessing()
ProcessingInterface
resumeProcessing
in interface ProcessingInterface
ProcessingInterface.resumeProcessing()
protected void flowControl() throws java.lang.InterruptedException
java.lang.InterruptedException
- Warten wurde unterbrochen.protected abstract java.lang.Object getClient()
public abstract long getJobId()
ProcessingInterface
getJobId
in interface ProcessingInterface
public void flowControl(long numData)
ProcessingInterface
flowControl
in interface ProcessingInterface
numData
- Bis zu welcher Datensatznummer (einfach durchnummeriert) Daten gesendet werden sollen.public void datasetSend()
public int getTimeout()