@NotThreadSafe public abstract class LockableChunk extends Object implements Chunk, Lock
STATE_FINISHED, STATE_GENERATED, STATE_NEW, STATE_POPULATED| Constructor and Description |
|---|
LockableChunk(Lock lock) |
| Modifier and Type | Method and Description |
|---|---|
void |
lock() |
void |
lockInterruptibly() |
Condition |
newCondition() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBlockEntity, addEntity, clear, clearDirty, close, compareTo, getAndSetBlock, getAndSetBlock, getBiome, getBiomeArray, getBlock, getBlock, getBlockEntities, getBlockEntity, getBlockLight, getEntities, getHeightMapArray, getHighestBlock, getLevel, getLoaders, getOrCreateSection, getPlayerLoaders, getPlayers, getSection, getSections, getSkyLight, getState, getX, getZ, isDirty, isFinished, isGenerated, isPopulated, key, readLockable, removeBlockEntity, removeEntity, setBiome, setBlock, setBlock, setBlockLight, setDirty, setDirty, setSkyLight, setState, writeLockablepublic LockableChunk(Lock lock)
public void lockInterruptibly()
throws InterruptedException
lockInterruptibly in interface LockInterruptedExceptionpublic boolean tryLock(long time,
@Nonnull
TimeUnit unit)
throws InterruptedException
tryLock in interface LockInterruptedExceptionpublic Condition newCondition()
newCondition in interface LockCopyright © 2021. All rights reserved.