public class JdbcPartitionManager extends Object implements PartitionManager
| Constructor and Description |
|---|
JdbcPartitionManager(DataSource dataSource) |
JdbcPartitionManager(org.springframework.jdbc.core.JdbcTemplate template) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
lockPartition(String consumerName,
String eventName,
String partition,
String lockedBy,
long timeout,
TimeUnit timeoutUnit) |
void |
unlockPartition(String consumerName,
String eventName,
String partition,
String lockedBy) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlockPartitionspublic JdbcPartitionManager(DataSource dataSource) throws IOException
IOExceptionpublic JdbcPartitionManager(org.springframework.jdbc.core.JdbcTemplate template)
throws IOException
IOExceptionpublic boolean lockPartition(String consumerName, String eventName, String partition, String lockedBy, long timeout, TimeUnit timeoutUnit)
lockPartition in interface PartitionManagerconsumerName - Name of the consuming application which might be running on multiple nodeseventName - Name of the eventpartition - The partition to locklockedBy - Name of one node of the consuming applicationtimeout - Timeout after that the lock will automatically be releasedtimeoutUnit - Time unit for the timeoutpublic void unlockPartition(String consumerName, String eventName, String partition, String lockedBy)
unlockPartition in interface PartitionManagerconsumerName - Name of the consuming application which might be running on multiple nodeseventName - Name of the eventpartition - The partition to locklockedBy - Name of one node of the consuming applicationCopyright © 2016 Zalando SE. All rights reserved.