@SolrThreadUnsafe 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
|
void |
delete(String path)
Delete a file cluster-wide
|
void |
deleteLocal(String path)
Delete file from local file system
|
static void |
deleteZKFileEntry(SolrZkClient client,
String path) |
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<PackageStore.FileDetails> |
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)
PackageStore
getRealpath
in interface PackageStore
public void put(PackageStore.FileEntry entry) throws IOException
PackageStore
put
in interface PackageStore
IOException
public boolean fetch(String path, String from)
PackageStore
fetch
in interface PackageStore
public void get(String path, Consumer<PackageStore.FileEntry> consumer, boolean fetchmissing) throws IOException
PackageStore
get
in interface PackageStore
IOException
public void syncToAllNodes(String path) throws IOException
PackageStore
syncToAllNodes
in interface PackageStore
IOException
public List<PackageStore.FileDetails> list(String path, Predicate<String> predicate)
list
in interface PackageStore
public void delete(String path)
PackageStore
delete
in interface PackageStore
public void deleteLocal(String path)
PackageStore
deleteLocal
in interface PackageStore
public void refresh(String path)
PackageStore
refresh
in interface PackageStore
path
- the path to be refreshed.public PackageStore.FileType getType(String path, boolean fetchMissing)
PackageStore
getType
in interface PackageStore
public 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
IOException
public Map<String,byte[]> getKeys() throws IOException
PackageStore
getKeys
in interface PackageStore
IOException
public static void deleteZKFileEntry(SolrZkClient client, String path)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.