Package org.apache.solr.filestore
Interface FileStore
-
- All Known Implementing Classes:
DistribFileStore
public interface FileStoreThe interface to be implemented by any package store provider * @lucene.experimental
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceFileStore.FileDetailsstatic classFileStore.FileEntrystatic classFileStore.FileType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(String path)Delete a file cluster-widevoiddeleteLocal(String path)Delete file from local file systembooleanfetch(String path, String from)Fetch a resource from another node internal APIvoidget(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.PathgetRealpath(String path)get the real path on filesystemFileStore.FileTypegetType(String path, boolean fetchMissing)The type of the resourceList<FileStore.FileDetails>list(String path, Predicate<String> predicate)voidput(FileStore.FileEntry fileEntry)Store a file into the filestore.voidrefresh(String path)Refresh the files in a path.voidsyncToAllNodes(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
-
-