public class ReadMarker extends Object
| Modifier and Type | Method and Description |
|---|---|
static ReadMarker |
fromIdentifierOrTime(String id,
long timestamp,
TimeUnit unit)
Starts reading the log from the last recorded point in the log for the given id.
|
static ReadMarker |
fromNow()
Starts reading the log such that it will start with the first entry written after now.
|
static ReadMarker |
fromTime(long timestamp,
TimeUnit unit)
Starts reading the log from the given timestamp onward.
|
String |
getIdentifier()
Returns the configured identifier of this marker or throws an exception if none exists.
|
Timepoint |
getStartTime(TimestampProvider times)
Returns the start time of this marker in microseconds
|
boolean |
hasIdentifier()
Whether this read marker has a configured identifier
|
public boolean hasIdentifier()
public String getIdentifier()
public Timepoint getStartTime(TimestampProvider times)
public static ReadMarker fromNow()
public static ReadMarker fromTime(long timestamp, TimeUnit unit)
timestamp - public static ReadMarker fromIdentifierOrTime(String id, long timestamp, TimeUnit unit)
id - timestamp - Copyright © 2012–2014. All rights reserved.