private DirectoryLoaderAdaptor getDirectory(final IndexScopedKey indexKey) { final String indexName = indexKey.getIndexName(); return getDirectory(indexName); }
private DirectoryLoaderAdaptor getDirectory(final IndexScopedKey indexKey) { final String indexName = indexKey.getIndexName(); return getDirectory(indexName); }
private DirectoryLoaderAdaptor getDirectory(final IndexScopedKey indexKey) { final String indexName = indexKey.getIndexName(); return getDirectory(indexName); }
/** * There might be Directories we didn't store yet in the openDirectories Map. * Make sure they are all initialized before serving methods such as {@link #publishEntries(Predicate, boolean, boolean)} */ private void scanForUnknownDirectories() { File[] filesInRoot = rootDirectory.listFiles(); if (filesInRoot != null) { for (File maybeDirectory : filesInRoot) { if (maybeDirectory.isDirectory()) { String name = maybeDirectory.getName(); try { getDirectory(name); } catch (PersistenceException e) { log.couldNotWalkDirectory(name, e); } } } } }
/** * There might be Directories we didn't store yet in the openDirectories Map. * Make sure they are all initialized before serving methods such as {@link #process(org.infinispan.persistence.spi.AdvancedCacheLoader.KeyFilter, org.infinispan.persistence.spi.AdvancedCacheLoader.CacheLoaderTask, java.util.concurrent.Executor, boolean, boolean)} */ private void scanForUnknownDirectories() { File[] filesInRoot = rootDirectory.listFiles(); for (File maybeDirectory : filesInRoot) { if (maybeDirectory.isDirectory()) { String name = maybeDirectory.getName(); try { getDirectory(name); } catch (PersistenceException e) { log.couldNotWalkDirectory(name, e); } } } }
/** * There might be Directories we didn't store yet in the openDirectories Map. * Make sure they are all initialized before serving methods such as {@link #process(KeyFilter, org.infinispan.persistence.spi.AdvancedCacheLoader.CacheLoaderTask, java.util.concurrent.Executor, boolean, boolean)} */ private void scanForUnknownDirectories() { File[] filesInRoot = rootDirectory.listFiles(); if (filesInRoot != null) { for (File maybeDirectory : filesInRoot) { if (maybeDirectory.isDirectory()) { String name = maybeDirectory.getName(); try { getDirectory(name); } catch (PersistenceException e) { log.couldNotWalkDirectory(name, e); } } } } }
@Override public boolean contains(final Object key) { if (key instanceof IndexScopedKey) { final IndexScopedKey indexKey = (IndexScopedKey)key; final DirectoryLoaderAdaptor directoryAdaptor = getDirectory(indexKey); return directoryAdaptor.containsKey(indexKey); } else { log.cacheLoaderIgnoringKey(key); return false; } }
@Override public boolean contains(final Object key) { if (key instanceof IndexScopedKey) { final IndexScopedKey indexKey = (IndexScopedKey)key; final DirectoryLoaderAdaptor directoryAdaptor = getDirectory(indexKey); return directoryAdaptor.containsKey(indexKey); } else { log.cacheLoaderIgnoringKey(key); return false; } }
@Override public boolean contains(final Object key) { if (key instanceof IndexScopedKey) { final IndexScopedKey indexKey = (IndexScopedKey)key; final DirectoryLoaderAdaptor directoryAdaptor = getDirectory(indexKey); return directoryAdaptor.containsKey(indexKey); } else { log.cacheLoaderIgnoringKey(key); return false; } }
@Override public MarshalledEntry load(final Object key) { if (key instanceof IndexScopedKey) { final IndexScopedKey indexKey = (IndexScopedKey)key; DirectoryLoaderAdaptor directoryAdaptor = getDirectory(indexKey); Object value = directoryAdaptor.load(indexKey); if (value != null) { return ctx.getMarshalledEntryFactory().newMarshalledEntry(key, value, null); } else { return null; } } else { log.cacheLoaderIgnoringKey(key); return null; } }
@Override public MarshalledEntry load(final Object key) { if (key instanceof IndexScopedKey) { final IndexScopedKey indexKey = (IndexScopedKey)key; DirectoryLoaderAdaptor directoryAdaptor = getDirectory(indexKey); Object value = directoryAdaptor.load(indexKey); if (value != null) { return ctx.getMarshalledEntryFactory().newMarshalledEntry(key, value, null); } else { return null; } } else { log.cacheLoaderIgnoringKey(key); return null; } }
@Override public MarshalledEntry load(final Object key) { if (key instanceof IndexScopedKey) { final IndexScopedKey indexKey = (IndexScopedKey)key; DirectoryLoaderAdaptor directoryAdaptor = getDirectory(indexKey); Object value = directoryAdaptor.load(indexKey); if (value != null) { return ctx.getMarshalledEntryFactory().newMarshalledEntry(key, value, null); } else { return null; } } else { log.cacheLoaderIgnoringKey(key); return null; } }