public class LatchFactory extends Object
| Constructor and Description |
|---|
LatchFactory() |
| Modifier and Type | Method and Description |
|---|---|
static Latch |
createExclusiveLatch(EnvironmentImpl envImpl,
String name,
boolean collectStats)
Creates a Latch, creating a LatchContext from the given name and
envImpl.
|
static Latch |
createExclusiveLatch(LatchContext context,
boolean collectStats)
Creates a Latch using a given LatchContext.
|
static SharedLatch |
createSharedLatch(EnvironmentImpl envImpl,
String name,
boolean exclusiveOnly)
Creates a SharedLatch, creating a LatchContext from the given name and
envImpl.
|
static SharedLatch |
createSharedLatch(LatchContext context,
boolean exclusiveOnly)
Creates a SharedLatch using a given LatchContext.
|
static LatchContext |
createTestLatchContext(String name)
Used for creating latches in tests, with having an EnvironmentImpl.
|
public static SharedLatch createSharedLatch(LatchContext context, boolean exclusiveOnly)
exclusiveOnly - indicates whether this latch can only be set
exclusively (not shared).public static SharedLatch createSharedLatch(EnvironmentImpl envImpl, String name, boolean exclusiveOnly)
exclusiveOnly - indicates whether this latch can only be set
exclusively (not shared).public static Latch createExclusiveLatch(LatchContext context, boolean collectStats)
collectStats - is true to collect stats. If false, a smaller and
faster implementation is used.public static Latch createExclusiveLatch(EnvironmentImpl envImpl, String name, boolean collectStats)
collectStats - is true to collect stats. If false, a smaller and
faster implementation is used.public static LatchContext createTestLatchContext(String name)
Copyright © 2024. All rights reserved.