public class TimingLatch extends Latch
| Modifier and Type | Class and Description |
|---|---|
class |
TimingLatch.AcquireCompleteEvent |
class |
TimingLatch.AcquireRequestEvent |
class |
TimingLatch.ReleaseEvent |
| Constructor and Description |
|---|
TimingLatch(java.lang.String name,
boolean debug) |
TimingLatch(java.lang.String name,
boolean debug,
int waitThreshold,
int holdThreshold) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquire()
Acquire a latch for exclusive/write access.
|
void |
release()
Release the latch.
|
acquireNoWait, clear, getLatchStats, getName, isOwner, nWaiters, owner, releaseIfOwner, setName, toStringpublic TimingLatch(java.lang.String name,
boolean debug)
public TimingLatch(java.lang.String name,
boolean debug,
int waitThreshold,
int holdThreshold)
public void release()
Latchpublic void acquire()
LatchWait for the latch if some other thread is holding it. If there are threads waiting for access, they will be granted the latch on a FIFO basis. When the method returns, the latch is held for exclusive access.
Copyright (c) 2004-2012 Oracle. All rights reserved.