public class IntervalLock
extends java.util.concurrent.locks.ReentrantReadWriteLock
Constructor and Description |
---|
IntervalLock(TimeSource timeSource) |
Modifier and Type | Method and Description |
---|---|
long |
getLastIntervalAcquire() |
void |
releaseIntervalLock()
Release the last acquired interval lock.
|
boolean |
tryIntervalLock(long interval)
Try acquiring a write lock if the given interval is passed since the last call to this method.
|
getOwner, getQueuedReaderThreads, getQueuedThreads, getQueuedWriterThreads, getQueueLength, getReadHoldCount, getReadLockCount, getWaitingThreads, getWaitQueueLength, getWriteHoldCount, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isWriteLocked, isWriteLockedByCurrentThread, readLock, toString, writeLock
public IntervalLock(TimeSource timeSource)
public boolean tryIntervalLock(long interval)
interval
- In millis.public void releaseIntervalLock()
public long getLastIntervalAcquire()
Copyright © 2009-2021 The Apache Software Foundation