Class AsyncNamedMap.OrderBy

    • Field Detail

      • RANDOM

        protected static final Random RANDOM
        Random number generator.
      • m_supplierOrderId

        protected final IntSupplier m_supplierOrderId
        A function that should be used to determine order id.
    • Constructor Detail

      • OrderBy

        protected OrderBy​(IntSupplier supplierOrderId)
        Construct OrderBy instance.
        Parameters:
        supplierOrderId - the function that should be used to determine order id
    • Method Detail

      • getOrderId

        public int getOrderId()
        Return unit-of-order id.
        Returns:
        the unit-of-order id
      • thread

        @Default
        public static AsyncNamedMap.OrderBy thread()
        Return the order that will ensure that all operations invoked from the same client thread are executed on the server sequentially, using the same unit-of-order.

        This tends to provide best performance for fast, non-blocking operations and is the default order if the order is not specified.

        Returns:
        the default, thread-based ordering
      • none

        public static AsyncNamedMap.OrderBy none()
        Return the order that will allow the server to parallelize the execution of async operations across multiple threads, regardless of whether they were invoked from the same client thread or not.
        Returns:
        the order which allows the server to parallelize the execution of async operations across multiple threads
      • id

        public static AsyncNamedMap.OrderBy id​(int nOrderId)
        Return the order that will use the specified unit-of-order for all async operations, regardless of whether they were invoked from the same client thread or not.
        Parameters:
        nOrderId - the unit-of-order to use for all operations
        Returns:
        the order which will use specified nOrderId for all operations
      • custom

        public static AsyncNamedMap.OrderBy custom​(IntSupplier supplierOrderId)
        Return the order that will use the specified supplier to provide unit-of-order for each async operation.
        Parameters:
        supplierOrderId - the function that should be used to determine order id
        Returns:
        the order which will use specified function to provide unit-of-order for each async operation