Class ReadWriteCache

java.lang.Object
org.apache.druid.metadata.segment.cache.ReadWriteCache
All Implemented Interfaces:
DatasourceSegmentCache, DatasourceSegmentMetadataReader, DatasourceSegmentMetadataWriter

public abstract class ReadWriteCache extends Object implements DatasourceSegmentCache
Cache with standard read/write locking.
  • Constructor Details

    • ReadWriteCache

      public ReadWriteCache(boolean fair)
  • Method Details

    • stop

      public void stop()
      Stops this cache. Any subsequent read/write action performed on this cache will throw a defensive DruidException.
    • withWriteLock

      public void withWriteLock(ReadWriteCache.Action action)
    • withWriteLock

      public <T> T withWriteLock(com.google.common.base.Supplier<T> action)
    • withReadLock

      public <T> T withReadLock(com.google.common.base.Supplier<T> action)