Package org.apache.solr.filestore
Interface FileStore
-
- All Known Implementing Classes:
DistribFileStore
public interface FileStore
The interface to be implemented by any package store provider * @lucene.experimental
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
FileStore.FileDetails
static class
FileStore.FileEntry
static class
FileStore.FileType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
delete(String path)
Delete a file cluster-widevoid
deleteLocal(String path)
Delete file from local file systemboolean
fetch(String path, String from)
Fetch a resource from another node internal APIvoid
get(String path, Consumer<FileStore.FileEntry> filecontent, boolean getMissing)
read file content from a given pathMap<String,byte[]>
getKeys()
Get all the keys in the package store.Path
getRealpath(String path)
get the real path on filesystemFileStore.FileType
getType(String path, boolean fetchMissing)
The type of the resourceList<FileStore.FileDetails>
list(String path, Predicate<String> predicate)
void
put(FileStore.FileEntry fileEntry)
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.
-
-
-
Method Detail
-
put
void put(FileStore.FileEntry fileEntry) throws IOException
Store a file into the filestore. This should ensure that it is replicated across all nodes in the cluster- Throws:
IOException
-
get
void get(String path, Consumer<FileStore.FileEntry> filecontent, boolean getMissing) throws IOException
read file content from a given path- Throws:
IOException
-
list
List<FileStore.FileDetails> list(String path, Predicate<String> predicate)
-
syncToAllNodes
void syncToAllNodes(String path) throws IOException
Sync a local file to all nodes. All the nodes are asked to pull the file from this node- Throws:
IOException
-
getType
FileStore.FileType getType(String path, boolean fetchMissing)
The type of the resource
-
getKeys
Map<String,byte[]> getKeys() throws IOException
Get all the keys in the package store. The data is a .DER file content- Throws:
IOException
-
refresh
void refresh(String path)
Refresh the files in a path. May be this node does not have all files- Parameters:
path
- the path to be refreshed.
-
delete
void delete(String path)
Delete a file cluster-wide
-
deleteLocal
void deleteLocal(String path)
Delete file from local file system
-
-