Interface PathIndex
- All Known Implementing Classes:
UnixFSPathIndex
public interface PathIndex
Manages the index of paths to revisions
ResourceIds as well as the inverse relationship.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyChange(Path path, String transactionId) Applies the change to theResourceIndexaccording to the supplied transaction ID.voidCleans up whatever may have been left behind by a partial transaction.default Optional<ResourceEntry> Loads theResourceEntryfrom the suppliedPath.findEntry(Path path, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Loads theResourceEntryfrom the suppliedPath.default Optional<ResourceId> findResourceId(Path path) Gets theResourceIdfor the supplied path.Lists all associations betweenPathandResourceIds.
-
Method Details
-
cleanup
Cleans up whatever may have been left behind by a partial transaction.- Parameters:
path- thePathtransactionId- the transaction ID
-
applyChange
Applies the change to theResourceIndexaccording to the supplied transaction ID.- Parameters:
path- thePathtransactionId- the transaction ID from which to apply
-
findEntry
Loads theResourceEntryfrom the suppliedPath. If non-existent then this will load a nascent path entry.- Parameters:
path-- Returns:
- the
Path
-
findEntry
Optional<ResourceEntry> findEntry(Path path, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Loads theResourceEntryfrom the suppliedPath. If non-existent then this will load a nascent path entry.- Returns:
- the
Path
-
list
Lists all associations betweenPathandResourceIds. This inclues listing of direct path links as well as wildcard path links.- Parameters:
path- thePath, may be wildcard if searching for multiple paths.- Returns:
- a
Stream<ResourceService.Listing>instances
-
findResourceId
Gets theResourceIdfor the supplied path.- Parameters:
path- thePathto find- Returns:
- the
ResourceIdorOptional.empty()if no such resource exists at the path
-