public class DistribPackageStore extends Object implements PackageStore
PackageStore.FileDetails, PackageStore.FileEntry, PackageStore.FileType| Constructor and Description |
|---|
DistribPackageStore(CoreContainer coreContainer) |
| Modifier and Type | Method and Description |
|---|---|
static PackageStore.FileType |
_getFileType(File file) |
static void |
_persistToFile(Path solrHome,
String path,
ByteBuffer data,
ByteBuffer meta)
Internal API
|
boolean |
fetch(String path,
String from)
Fetch a resource from another node
internal API
|
void |
get(String path,
Consumer<PackageStore.FileEntry> consumer,
boolean fetchmissing)
read file content from a given path
|
Map<String,byte[]> |
getKeys()
Get all the keys in the package store.
|
static Path |
getPackageStoreDirPath(Path solrHome) |
Path |
getRealpath(String path)
get the real path on filesystem
|
PackageStore.FileType |
getType(String path,
boolean fetchMissing)
The type of the resource
|
static boolean |
isMetaDataFile(String file) |
List |
list(String path,
Predicate<String> predicate) |
void |
put(PackageStore.FileEntry entry)
Store a file into the filestore.
|
void |
refresh(String path)
Refresh the files in a path.
|
void |
syncToAllNodes(String path)
Sync a local file to all nodes.
|
public DistribPackageStore(CoreContainer coreContainer)
public Path getRealpath(String path)
PackageStoregetRealpath in interface PackageStorepublic void put(PackageStore.FileEntry entry) throws IOException
PackageStoreput in interface PackageStoreIOExceptionpublic boolean fetch(String path, String from)
PackageStorefetch in interface PackageStorepublic void get(String path, Consumer<PackageStore.FileEntry> consumer, boolean fetchmissing) throws IOException
PackageStoreget in interface PackageStoreIOExceptionpublic void syncToAllNodes(String path) throws IOException
PackageStoresyncToAllNodes in interface PackageStoreIOExceptionpublic List list(String path, Predicate<String> predicate)
list in interface PackageStorepublic void refresh(String path)
PackageStorerefresh in interface PackageStorepath - the path to be refreshed.public PackageStore.FileType getType(String path, boolean fetchMissing)
PackageStoregetType in interface PackageStorepublic static PackageStore.FileType _getFileType(File file)
public static boolean isMetaDataFile(String file)
public static void _persistToFile(Path solrHome, String path, ByteBuffer data, ByteBuffer meta) throws IOException
IOExceptionpublic Map<String,byte[]> getKeys() throws IOException
PackageStoregetKeys in interface PackageStoreIOExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.