Class ReturnOrAwait<T>

    • Method Detail

      • runAgain

        public static <T> ReturnOrAwait<T> runAgain()
        Wait for nothing; that is: run again as soon as possible.
      • awaitAll

        public static <T> ReturnOrAwait<T> awaitAll​(it.unimi.dsi.fastutil.ints.IntSet await)
        Wait for all provided channels to become readable (or finished). Numbers in this set correspond to positions in the FrameProcessor.inputChannels() list. It is OK to pass in a mutable set, because this method does not modify the set or retain a reference to it.
      • awaitAll

        public static <T> ReturnOrAwait<T> awaitAll​(int count)
        Wait for all of a certain number of channels.
      • awaitAny

        public static <T> ReturnOrAwait<T> awaitAny​(it.unimi.dsi.fastutil.ints.IntSet await)
        Wait for any of the provided channels to become readable (or finished). When using this, callers should consider removing any fully-processed and finished channels from the await-set, because if any channels in the await-set are finished, the processor will run again immediately. Numbers in this set correspond to positions in the FrameProcessor.inputChannels() list. It is OK to pass in a mutable set, because this method does not modify the set or retain a reference to it.
      • returnObject

        public static <T> ReturnOrAwait<T> returnObject​(T o)
        Return a result.
      • awaitSet

        public it.unimi.dsi.fastutil.ints.IntSet awaitSet()
        The set of channels the processors wants to wait for. Valid if isAwait() is true. Numbers in this set correspond to positions in the FrameProcessor.inputChannels() list.
      • isReturn

        public boolean isReturn()
        Whether the processor has returned a value. This is the opposite of isAwait().
      • isAwait

        public boolean isAwait()
        Whether the processor wants to be scheduled again. This is the opposite of isReturn().
      • isAwaitAll

        public boolean isAwaitAll()
        Whether the processor wants to wait for all channels in awaitSet() (true), or any channel (false)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object