Interface IQueueChunk<T extends Future<T>>

All Superinterfaces:
Callable<T>, IBlocks, IChunk, IChunkGet, IChunkSet, InputExtent, ITileInput, OutputExtent, Trimable
All Known Implementing Classes:
ChunkHolder, NullChunk

@Internal public interface IQueueChunk<T extends Future<T>> extends IChunk, Callable<T>
  • Method Details

    • reset

      default IQueueChunk<T> reset()
      Reset (defaults to just calling init)
      Specified by:
      reset in interface IBlocks
      Specified by:
      reset in interface IChunk
      Specified by:
      reset in interface IChunkSet
    • setWrapper

      void setWrapper(WrapperChunk<?> parentWrapper)
      Set a new WrapperChunk that allows prevention of a ChunkHolder instance being cached "locally" whilst it has been called/submitted, causing issues with processing/postprocessing, etc. If a wrapper has already been set, throws IllegalStateException as there should be no circumstance for us to set a new wrapper (does nothing if attempting to set the same wrapper).
      Parameters:
      parentWrapper - wrapper wrapping this instance
      Throws:
      IllegalStateException - if there is already a wrapper set and a new wrapper instance is attempted to be se
      Since:
      TODO
    • invalidateWrapper

      void invalidateWrapper()
      Invalidate the WrapperChunk if present.
      Since:
      2.15.0
    • call

      T call()
      Apply the queued changes to the world containing this chunk.

      The future returned may return another future. To ensure completion keep calling Future.get() on each result.

      Specified by:
      call in interface Callable<T extends Future<T>>
      Returns:
      Future
    • join

      default void join() throws ExecutionException, InterruptedException
      Call and join - Should be done async, if at all
      Throws:
      ExecutionException
      InterruptedException
    • hasRunning

      default boolean hasRunning()
      Get if the thank has any running tasks, locked locks, etc.
    • lockSet

      default void lockSet()
      Prevent set operations to the chunk, should typically be used when a chunk is submitted before the edit is necessarily completed.