use of alluxio.client.file.cache.store.MemoryPageStore in project alluxio by Alluxio.
the class PageStore method open.
/**
* Opens an existing {@link PageStore}.
*
* @param options the options to instantiate the page store
* @return a PageStore instance
* @throws IOException if I/O error happens
*/
static PageStore open(PageStoreOptions options) throws IOException {
LOG.info("Opening PageStore with option={}", options.toString());
final PageStore pageStore;
switch(options.getType()) {
case LOCAL:
pageStore = new LocalPageStore(options.toOptions());
break;
case ROCKS:
pageStore = RocksPageStore.open(options.toOptions());
break;
case MEM:
pageStore = new MemoryPageStore(options.toOptions());
break;
default:
throw new IllegalArgumentException("Incompatible PageStore " + options.getType() + " specified");
}
if (options.getTimeoutDuration() > 0) {
return new TimeBoundPageStore(pageStore, options);
}
return pageStore;
}
Aggregations