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
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic classstatic enum -
Method Summary
Modifier and TypeMethodDescriptionvoidDelete a file cluster-widevoiddeleteLocal(String path) Delete file from local file systembooleanFetch a resource from another node internal APIvoidget(String path, Consumer<FileStore.FileEntry> consumer, boolean fetchMissing) Read file content from a given path.getKeys()Get all the keys in the package store.getRealPath(String path) get the real path on filesystemThe type of the resourcevoidput(FileStore.FileEntry fileEntry) Store a file into the filestore.voidRefresh the files in a path.voidsyncToAllNodes(String path) Sync a local file to all nodes.
-
Method Details
-
put
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> consumer, boolean fetchMissing) throws IOException Read file content from a given path.TODO: Is fetchMissing actually used? I don't see it being used, but the IDE doesn't flag it not being used!
- Throws:
IOException
-
fetch
Fetch a resource from another node internal API -
list
-
syncToAllNodes
Sync a local file to all nodes. All the nodes are asked to pull the file from this node- Throws:
IOException
-
getRealPath
get the real path on filesystem -
getType
The type of the resource -
getKeys
Get all the keys in the package store. The data is a .DER file content- Throws:
IOException
-
refresh
Refresh the files in a path. Maybe this node does not have all files?- Parameters:
path- the path to be refreshed.
-
delete
Delete a file cluster-wide -
deleteLocal
Delete file from local file system
-