Interface ResourceIndex
- All Known Implementing Classes:
UnixFSResourceIndex
public interface ResourceIndex
Allows for fetching and opening of the
Resource
data.-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyContentsChange
(ResourceId resourceId, String transactionId) Applies the change to theResourceIndex
according to the supplied transaction ID.void
applyReversePathsChange
(ResourceId resourceId, String transactionId) Applies the change to theResourceIndex
according to the supplied transaction ID.void
cleanup
(ResourceId resourceId, String transactionId) Cleans up whatever may have been left behind by a partial transaction.default boolean
exists
(ResourceId resourceId) Checks if aResourceId
exists.default Optional
<ResourceEntry> findEntry
(ResourceId resourceId) Loads theResourceEntry
from the suppliedPath
.findEntry
(ResourceId resourceId, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Loads theResourceEntry
from the suppliedPath
.findReversePaths
(ResourceId resourceId) Finds reverse paths for theResourceId
.newEntry
(ResourceId resourceId, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Creates a newResourceEntry
with the supplied transaction id andResourceId
.updateContents
(ResourceId resourceId) Creates a newResourceContents
for the suppliedResourceId
.
-
Method Details
-
cleanup
Cleans up whatever may have been left behind by a partial transaction.- Parameters:
transactionId
- the transaction ID
-
applyContentsChange
Applies the change to theResourceIndex
according to the supplied transaction ID.- Parameters:
resourceId
- theResourceId
transactionId
- the transaction ID from which to apply
-
applyReversePathsChange
Applies the change to theResourceIndex
according to the supplied transaction ID.- Parameters:
resourceId
- theResourceId
transactionId
- the transaction ID from which to apply
-
newEntry
ResourceEntry newEntry(ResourceId resourceId, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Creates a newResourceEntry
with the supplied transaction id andResourceId
.- Parameters:
resourceId
- the resource idoperationalStrategy
- the operational strategy
-
updateContents
Creates a newResourceContents
for the suppliedResourceId
.- Parameters:
resourceId
- the contents- Returns:
- the
ResourceContents
-
findEntry
Loads theResourceEntry
from the suppliedPath
. If non-existent then this will load a nascent path entry.- Returns:
- the
Path
-
findEntry
Optional<ResourceEntry> findEntry(ResourceId resourceId, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Loads theResourceEntry
from the suppliedPath
. If non-existent then this will load a nascent path entry.- Returns:
- the
Path
-
findReversePaths
Finds reverse paths for theResourceId
.- Parameters:
resourceId
- theResourceId
- Returns:
- the
Optional
set of reverse paths
-
exists
Checks if aResourceId
exists.- Parameters:
resourceId
- theResourceId
- Returns:
- true if it exists, false otherwise
-