public static class ChunkManager.ChunkLock extends Object implements Iterable<GlowChunk.Key>
Constructor and Description |
---|
ChunkLock(ChunkManager cm,
String desc) |
Modifier and Type | Method and Description |
---|---|
void |
acquire(GlowChunk.Key key)
Acquires a lock on the given chunk key, if it's not already held.
|
void |
clear()
Release all locks.
|
Iterator<GlowChunk.Key> |
iterator() |
void |
release(GlowChunk.Key key)
Releases a lock on the given chunk key, if it's not already held.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public ChunkLock(ChunkManager cm, String desc)
public void acquire(GlowChunk.Key key)
key
- the key to lockpublic void release(GlowChunk.Key key)
key
- the key to lockpublic void clear()
public Iterator<GlowChunk.Key> iterator()
iterator
in interface Iterable<GlowChunk.Key>
Copyright © 2021. All rights reserved.