Top Inners Fields Constructors Methods
io.vertx.core.shareddata.impl

public Class LocalAsyncLocks

extends Object
Class Inheritance
Imports
io.vertx.core.Context, .Future, .Promise, io.vertx.core.impl.ContextInternal, io.vertx.core.shareddata.Lock, java.util.ArrayList, .List, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap, java.util.concurrent.atomic.AtomicBoolean

Author
Thomas Segismont

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
private final ConcurrentMap<String, List<LocalAsyncLocks.LockWaiter>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Future<Lock>
acquire(ContextInternal context, String name, long timeout)

private void
nextWaiter(String lockName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

waitersMapback to summary
private final ConcurrentMap<String, List<LocalAsyncLocks.LockWaiter>> waitersMap

Constructor Detail

LocalAsyncLocksback to summary
public LocalAsyncLocks()

Method Detail

acquireback to summary
public Future<Lock> acquire(ContextInternal context, String name, long timeout)
nextWaiterback to summary
private void nextWaiter(String lockName)
io.vertx.core.shareddata.impl back to summary

private Class LocalAsyncLocks.AsyncLock

extends Object
implements LockInternal
Class Inheritance
All Implemented Interfaces
io.vertx.core.shareddata.impl.LockInternal, io.vertx.core.shareddata.Lock

Field Summary

Modifier and TypeField and Description
pack-priv final AtomicBoolean
pack-priv final String

Constructor Summary

AccessConstructor and Description
pack-priv
AsyncLock(String lockName)

Method Summary

Modifier and TypeMethod and Description
public void
release()

Implements io.vertx.core.shareddata.Lock.release.

Release the lock.

public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

invokedback to summary
pack-priv final AtomicBoolean invoked
lockNameback to summary
pack-priv final String lockName

Constructor Detail

AsyncLockback to summary
pack-priv AsyncLock(String lockName)

Method Detail

releaseback to summary
public void release()

Implements io.vertx.core.shareddata.Lock.release.

Doc from io.vertx.core.shareddata.Lock.release.

Release the lock. Once the lock is released another will be able to obtain the lock.

Annotations
@Override
waitersback to summary
public int waiters()

Implements io.vertx.core.shareddata.impl.LockInternal.waiters.

Returns:int

Doc from io.vertx.core.shareddata.impl.LockInternal.waiters.

an estimate of the number of waiters

Annotations
@Override
io.vertx.core.shareddata.impl back to summary

private Class LocalAsyncLocks.LockWaiter

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final ContextInternal
pack-priv final String
pack-priv final Promise<Lock>
pack-priv final Long

Constructor Summary

AccessConstructor and Description
pack-priv
LockWaiter(ContextInternal context, String lockName, long timeout, Promise<Lock> promise)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
pack-priv final ContextInternal context
lockNameback to summary
pack-priv final String lockName
promiseback to summary
pack-priv final Promise<Lock> promise
timerIdback to summary
pack-priv final Long timerId

Constructor Detail

LockWaiterback to summary
pack-priv LockWaiter(ContextInternal context, String lockName, long timeout, Promise<Lock> promise)

Method Detail

acquireLockback to summary
pack-priv void acquireLock()
timeoutback to summary
pack-priv void timeout()