Interface PathIndex
- All Known Implementing Classes:
UnixFSPathIndex
public interface PathIndex
Manages the index of paths to revisions
ResourceId
s as well as the inverse relationship.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyChange
(Path path, String transactionId) Applies the change to theResourceIndex
according to the supplied transaction ID.void
Cleans up whatever may have been left behind by a partial transaction.default Optional
<ResourceEntry> Loads theResourceEntry
from the suppliedPath
.findEntry
(Path path, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Loads theResourceEntry
from the suppliedPath
.default Optional
<ResourceId> findResourceId
(Path path) Gets theResourceId
for the supplied path.Lists all associations betweenPath
andResourceId
s.
-
Method Details
-
cleanup
Cleans up whatever may have been left behind by a partial transaction.- Parameters:
path
- thePath
transactionId
- the transaction ID
-
applyChange
Applies the change to theResourceIndex
according to the supplied transaction ID.- Parameters:
path
- thePath
transactionId
- the transaction ID from which to apply
-
findEntry
Loads theResourceEntry
from 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 theResourceEntry
from the suppliedPath
. If non-existent then this will load a nascent path entry.- Returns:
- the
Path
-
list
Lists all associations betweenPath
andResourceId
s. 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 theResourceId
for the supplied path.- Parameters:
path
- thePath
to find- Returns:
- the
ResourceId
orOptional.empty()
if no such resource exists at the path
-