Class GridCacheAdapter.FutureHolder

  • Enclosing class:
    GridCacheAdapter<K,​V>

    public static class GridCacheAdapter.FutureHolder
    extends Object
    Holder for last async operation future.
    • Constructor Detail

      • FutureHolder

        public FutureHolder()
    • Method Detail

      • tryLock

        public boolean tryLock()
        Tries to acquire lock.
        Returns:
        Whether lock was actually acquired.
      • lock

        public void lock()
        Acquires lock.
      • unlock

        public void unlock()
        Releases lock.
      • holdsLock

        public boolean holdsLock()
        Returns:
        Whether lock is held by current thread.
      • future

        public void future​(@Nullable
                           @Nullable IgniteInternalFuture<?> fut)
        Sets future.
        Parameters:
        fut - Future.
      • await

        public void await()
        Awaits for previous async operation to be completed.
      • saveFuture

        public void saveFuture​(IgniteInternalFuture<?> fut)
        Saves future in the holder and adds listener that will clear holder when future is finished.
        Parameters:
        fut - Future to save.