Package com.coditory.sherlock
Class ReactiveMongoSherlock
- java.lang.Object
-
- com.coditory.sherlock.ReactiveMongoSherlock
-
public final class ReactiveMongoSherlock extends java.lang.Object
BuildsReactiveSherlock
that uses MongoDB for locking mechanism.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.coditory.sherlock.ReactiveSherlock
build()
static ReactiveMongoSherlock
builder()
ReactiveMongoSherlock
withClock(java.time.Clock clock)
T
withLockDuration(java.time.Duration arg0)
ReactiveMongoSherlock
withLocksCollection(com.mongodb.reactivestreams.client.MongoCollection<org.bson.Document> collection)
T
withOwnerId(java.lang.String arg0)
T
withStaticUniqueOwnerId()
T
withUniqueOwnerId()
-
-
-
Method Detail
-
builder
public static ReactiveMongoSherlock builder()
- Returns:
- new instance of the builder
-
withLocksCollection
public ReactiveMongoSherlock withLocksCollection(com.mongodb.reactivestreams.client.MongoCollection<org.bson.Document> collection)
- Parameters:
collection
- mongo collection to be used for locking- Returns:
- the instance
-
withClock
public ReactiveMongoSherlock withClock(java.time.Clock clock)
- Parameters:
clock
- time provider used in locking mechanism. Default:SherlockDefaults.DEFAULT_CLOCK
- Returns:
- the instance
-
build
public com.coditory.sherlock.ReactiveSherlock build()
-
withLockDuration
public T withLockDuration(java.time.Duration arg0)
-
withOwnerId
public T withOwnerId(java.lang.String arg0)
-
withUniqueOwnerId
public T withUniqueOwnerId()
-
withStaticUniqueOwnerId
public T withStaticUniqueOwnerId()
-
-