org.sirix.cache.GuavaCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirix-core Show documentation
Show all versions of sirix-core Show documentation
SirixDB is a hybrid on-disk and in-memory document oriented, versioned database system. It has a lightweight buffer manager, stores everything in a huge persistent and durable tree and allows efficient reconstruction of every revision. Furthermore, SirixDB implements change tracking, diffing and supports time travel queries.
// package org.sirix.cache;
//
// import static com.google.common.base.Preconditions.checkNotNull;
// import com.google.common.cache.CacheBuilder;
// import com.google.common.cache.CacheLoader;
// import com.google.common.cache.LoadingCache;
// import com.google.common.cache.RemovalListener;
// import com.google.common.cache.RemovalNotification;
// import com.google.common.collect.ImmutableMap;
//
// import java.util.Map;
// import java.util.concurrent.ConcurrentMap;
// import java.util.concurrent.ExecutionException;
// import java.util.concurrent.TimeUnit;
//
// import org.checkerframework.checker.nullness.qual.NonNull;
// import org.checkerframework.checker.nullness.qual.Nullable;
//
// import org.sirix.api.PageReadTrx;
// import org.sirix.exception.SirixIOException;
// import org.sirix.page.PageKind;
//
/// **
// * Cache utilizing the Guava cache functionality.
// *
// * @author Johannes Lichtenberger, University of Konstanz
// *
// */
// public class GuavaCache implements Cache {
//
// /**
// * Determines after how many seconds to expire entries after the last access.
// */
// private static final int EXPIRE_AFTER = 15;
//
// /**
// * Maximum cache size.
// */
// private static final int MAX_SIZE = 20;
//
// /**
// * {@link LoadingCache} reference.
// */
// private final LoadingCache mCache;
//
// /**
// * Second cache.
// */
// private final Cache mSecondCache;
//
// /**
// * Constructor with second cache.
// *
// * @param pageReadTransaction
// * {@link PageReadTrx} implementation
// * @param secondCache
// * second fallback cache
// */
// public GuavaCache(final PageReadTrx pageReadTransaction,
// final Cache secondCache) {
// checkNotNull(pageReadTransaction);
// mSecondCache = checkNotNull(secondCache);
//
// final CacheBuilder
© 2015 - 2025 Weber Informatics LLC | Privacy Policy