Enum DispatchQueue.EnqueueResult

    • Enum Constant Detail

      • IMMEDIATE

        public static final DispatchQueue.EnqueueResult IMMEDIATE
        Used to represent that the entry was immediately queued in such a way that it is likely to be processed soon and should be tracked by the client. For instance, the entry could have been queued directly on the heap.

        This result indicates that if the entry gets dispatched it will be within the lifespan of the current process such that any clients tracking the entry in memory will still be valid upon dispatch.

      • DEFERRED

        public static final DispatchQueue.EnqueueResult DEFERRED
        Used to represent that the entry was queued but in such a way that it is not likely to be processed soon and should not be tracked by the client. For instance, the entry could have been queued by being serialized to disk and may not be processed until after a restart.
    • Method Detail

      • values

        public static DispatchQueue.EnqueueResult[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DispatchQueue.EnqueueResult c : DispatchQueue.EnqueueResult.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DispatchQueue.EnqueueResult valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null