Class AsyncNamedMap.OrderBy

java.lang.Object
com.tangosol.net.AsyncNamedMap.OrderBy
All Implemented Interfaces:
AsyncNamedMap.Option
Enclosing interface:
AsyncNamedMap<K,V>

public static class AsyncNamedMap.OrderBy extends Object implements AsyncNamedMap.Option
A configuration option which determines the ordering of async operations.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final IntSupplier
    A function that should be used to determine order id.
    protected static final AsyncNamedMap.OrderBy
    The none-order singleton.
    protected static final Random
    Random number generator.
    protected static final AsyncNamedMap.OrderBy
    The thread-order singleton.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    OrderBy(IntSupplier supplierOrderId)
    Construct OrderBy instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    custom(IntSupplier supplierOrderId)
    Return the order that will use the specified supplier to provide unit-of-order for each async operation.
    int
    Return unit-of-order id.
    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.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RANDOM

      protected static final Random RANDOM
      Random number generator.
    • THREAD

      protected static final AsyncNamedMap.OrderBy THREAD
      The thread-order singleton.
    • NONE

      protected static final AsyncNamedMap.OrderBy NONE
      The none-order singleton.
    • m_supplierOrderId

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

    • OrderBy

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

    • 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