Class MapOptions<K,V>

  • Type Parameters:
    K - key type
    V - value type
    Direct Known Subclasses:
    LocalCachedMapOptions

    public class MapOptions<K,V>
    extends Object
    Configuration for Map object.
    Author:
    Nikita Koksharov
    • Constructor Detail

      • MapOptions

        protected MapOptions()
    • Method Detail

      • defaults

        public static <K,V> MapOptions<K,V> defaults()
        Creates a new instance of MapOptions with default options.

        This is equivalent to:

             new MapOptions()
              .writer(null, null).loader(null);
         
        Type Parameters:
        K - key type
        V - value type
        Returns:
        MapOptions instance
      • writeBehindBatchSize

        public MapOptions<K,V> writeBehindBatchSize(int writeBehindBatchSize)
        Sets write behind tasks batch size. During MapWriter methods execution all updates accumulated into a batch of specified size.

        Default is 50

        Parameters:
        writeBehindBatchSize - - size of batch
        Returns:
        MapOptions instance
      • getWriteBehindBatchSize

        public int getWriteBehindBatchSize()
      • writeBehindDelay

        public MapOptions<K,V> writeBehindDelay(int writeBehindDelay)
        Sets write behind tasks execution delay. All updates would be applied with lag not more than specified delay.

        Default is 1000 milliseconds

        Parameters:
        writeBehindDelay - - delay in milliseconds
        Returns:
        MapOptions instance
      • getWriteBehindDelay

        public int getWriteBehindDelay()