public class JdbcCursorManager extends Object implements CursorManager
OFFSET_ORDERING| Constructor and Description |
|---|
JdbcCursorManager(DataSource dataSource,
String consumerName) |
JdbcCursorManager(org.springframework.jdbc.core.JdbcTemplate template,
String consumerName) |
JdbcCursorManager(org.springframework.jdbc.core.JdbcTemplate template,
String consumerName,
String schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
fromNewestAvailableOffsets(String eventName,
List<Partition> partitions)
Initializes offsets to start streaming from the newest available offset.
|
void |
fromOldestAvailableOffset(String eventName,
List<Partition> partitions)
Initializes offsets to start streaming at the oldest available offset (BEGIN).
|
Collection<Cursor> |
getCursors(String eventName) |
void |
onError(String eventName,
Cursor cursor,
Throwable throwable) |
void |
onSuccess(String eventName,
Cursor cursor) |
void |
updatePartitions(String eventName,
List<Partition> partitions)
Updates offsets in case the currently stored offset is no longer available.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSubscriptionpublic JdbcCursorManager(org.springframework.jdbc.core.JdbcTemplate template,
String consumerName,
String schema)
public JdbcCursorManager(org.springframework.jdbc.core.JdbcTemplate template,
String consumerName)
public JdbcCursorManager(DataSource dataSource, String consumerName)
@Transactional public void onSuccess(String eventName, Cursor cursor) throws IOException
onSuccess in interface CursorManagerIOExceptionpublic void onError(String eventName, Cursor cursor, Throwable throwable)
onError in interface CursorManagerpublic Collection<Cursor> getCursors(String eventName) throws IOException
getCursors in interface CursorManagerIOException@Transactional public void fromNewestAvailableOffsets(String eventName, List<Partition> partitions) throws IOException
CursorManagerfromNewestAvailableOffsets in interface CursorManagerIOException@Transactional public void fromOldestAvailableOffset(String eventName, List<Partition> partitions) throws IOException
CursorManagerfromOldestAvailableOffset in interface CursorManagerIOException@Transactional public void updatePartitions(String eventName, List<Partition> partitions) throws IOException
CursorManagerupdatePartitions in interface CursorManagerIOExceptionCopyright © 2016 Zalando SE. All rights reserved.