Package 

Interface CacheTransaction

  • All Implemented Interfaces:

    
    public interface CacheTransaction<V extends Object>
    
                        

    An atomic transaction run on a cache for objects of type V.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract V get(String key) Gets the current cached value for the given key.
      abstract Unit put(String key, V value) Writes the cached value for the given key.
      <V extends Any> V getOrPut(CacheTransaction<V> $self, String key, SuspendFunction0<V> defaultValue) Gets the current cached value for the given key or creates and caches a new one.
      abstract V remove(String key) Clears the cached value for the given key.
      abstract Unit clear() Clears all cached values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait