public class ConfigToken extends Object implements TrackingToken, Serializable
TokenStore instance.
This class merely implements TrackingToken to adhere to certain API requirements. It is not meant to be used
as a means to track progress of event stream processing.
| Constructor and Description |
|---|
ConfigToken(Map<String,String> config)
Initialize a ConfigToken instance using the given
config properties. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
covers(TrackingToken other)
Indicates whether this token covers the
other token completely. |
boolean |
equals(Object o) |
String |
get(String key)
Retrieves the value of the configuration element for the given
key. |
Map<String,String> |
getConfig()
Returns the properties contained in this token as a Map.
|
int |
hashCode() |
TrackingToken |
lowerBound(TrackingToken other)
Returns a token that represents the lower bound between this and the
other token. |
String |
toString() |
TrackingToken |
upperBound(TrackingToken other)
Returns the token that represents the furthest possible position in a stream that either this token or the given
other represents. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitposition@ConstructorProperties(value="config") public ConfigToken(Map<String,String> config)
config properties.config - the properties to store as part of this ConfigTokenpublic Map<String,String> getConfig()
public String get(String key)
key.key - the key for which to retrieve the configuration elementnull if no such key was present.public TrackingToken lowerBound(TrackingToken other)
TrackingTokenother token. Effectively, the
returned token will cause messages not received by both this and the other token to be redelivered.lowerBound in interface TrackingTokenother - The token to compare to this onepublic TrackingToken upperBound(TrackingToken other)
TrackingTokenother represents. Effectively, this means this token will only deliver messages that neither this, nor
the other have been received.upperBound in interface TrackingTokenother - The token to compare this token topublic boolean covers(TrackingToken other)
TrackingTokenother token completely. That means that this token represents a
position in a stream that has received all of the messages that a stream represented by the other token
has received.
Note that this operation is only safe when comparing tokens obtained from messages from the same
StreamableMessageSource.
covers in interface TrackingTokenother - The token to compare to this onetrue if this token covers the other, otherwise falseCopyright © 2010–2025. All rights reserved.