public class DebugEnabledTimedLock extends Object implements DebuggableTimedLock
| Modifier and Type | Field and Description |
|---|---|
private int |
iterationFrequency |
private Lock |
lock |
private Map<String,Long> |
lockIterations |
private Map<String,Long> |
lockNanos |
private long |
lockTime |
private org.slf4j.Logger |
logger |
private String |
name |
| Constructor and Description |
|---|
DebugEnabledTimedLock(Lock lock,
String name,
int iterationFrequency) |
| Modifier and Type | Method and Description |
|---|---|
void |
lock() |
boolean |
tryLock() |
boolean |
tryLock(long timeout,
TimeUnit timeUnit) |
void |
unlock(String task) |
private final Lock lock
private final org.slf4j.Logger logger
private long lockTime
private final String name
private final int iterationFrequency
public boolean tryLock()
tryLock in interface DebuggableTimedLockpublic boolean tryLock(long timeout,
TimeUnit timeUnit)
tryLock in interface DebuggableTimedLocktimeout - duration to wait for locktimeUnit - unit to understand given durationpublic void lock()
lock in interface DebuggableTimedLockpublic void unlock(String task)
unlock in interface DebuggableTimedLocktask - to release the lock forCopyright © 2023 Apache NiFi Project. All rights reserved.