public class Stream
extends java.lang.Object
Stream
object will be returned when the method
SpringStreams.track(StreamAdapter, Map)
will be called.
The method stop()
can be called if the measurement should be stopped.
It is not possible to reactivate the measurement. For that purpose the method
SpringStreams.track(StreamAdapter, Map)
has to be called again.SpringStreams
,
StreamAdapter
Constructor and Description |
---|
Stream(SpringStreamsBase c,
java.lang.String streamName,
StreamAdapter sa,
java.util.Map<java.lang.String,java.lang.Object> a,
java.lang.String handle)
Creates a new stream.
|
Modifier and Type | Method and Description |
---|---|
long |
getDiff() |
java.lang.String |
getStreamName() |
java.lang.String |
getUid()
Returns the UID of the stream.
|
boolean |
isClosed() |
void |
stop()
Sync the current state immediately if necessary and stops the
tracking.
|
void |
sync(long time)
This function is called by the spring-sync-timer and performs
synchronization of the data collected
|
void |
update(long time)
This function is called by the spring-track-timer in subsequent intervals
and collects the current stream position
|
public Stream(SpringStreamsBase c, java.lang.String streamName, StreamAdapter sa, java.util.Map<java.lang.String,java.lang.Object> a, java.lang.String handle)
c
- The collector object.streamName
- The unique name of the stream.sa
- The StreamAdapter
for this stream.a
- The map with attributes.handle
- UID for the stream to be measured.public void stop()
SpringStreams.track(StreamAdapter, Map)
public boolean isClosed()
public java.lang.String getUid()
public long getDiff()
public java.lang.String getStreamName()
public void sync(long time)
time
- Sync Timer intervalpublic void update(long time)
time
- Track Timer interval