Interface ResourceIndex
- All Known Implementing Classes:
UnixFSResourceIndex
public interface ResourceIndex
Allows for fetching and opening of the
Resource data.-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyContentsChange(ResourceId resourceId, String transactionId) Applies the change to theResourceIndexaccording to the supplied transaction ID.voidapplyReversePathsChange(ResourceId resourceId, String transactionId) Applies the change to theResourceIndexaccording to the supplied transaction ID.voidcleanup(ResourceId resourceId, String transactionId) Cleans up whatever may have been left behind by a partial transaction.default booleanexists(ResourceId resourceId) Checks if aResourceIdexists.default Optional<ResourceEntry> findEntry(ResourceId resourceId) Loads theResourceEntryfrom the suppliedPath.findEntry(ResourceId resourceId, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Loads theResourceEntryfrom the suppliedPath.findReversePaths(ResourceId resourceId) Finds reverse paths for theResourceId.newEntry(ResourceId resourceId, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Creates a newResourceEntrywith the supplied transaction id andResourceId.updateContents(ResourceId resourceId) Creates a newResourceContentsfor 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 theResourceIndexaccording to the supplied transaction ID.- Parameters:
resourceId- theResourceIdtransactionId- the transaction ID from which to apply
-
applyReversePathsChange
Applies the change to theResourceIndexaccording to the supplied transaction ID.- Parameters:
resourceId- theResourceIdtransactionId- the transaction ID from which to apply
-
newEntry
ResourceEntry newEntry(ResourceId resourceId, Supplier<ResourceEntry.OperationalStrategy> operationalStrategy) Creates a newResourceEntrywith the supplied transaction id andResourceId.- Parameters:
resourceId- the resource idoperationalStrategy- the operational strategy
-
updateContents
Creates a newResourceContentsfor the suppliedResourceId.- Parameters:
resourceId- the contents- Returns:
- the
ResourceContents
-
findEntry
Loads theResourceEntryfrom 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 theResourceEntryfrom 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
Optionalset of reverse paths
-
exists
Checks if aResourceIdexists.- Parameters:
resourceId- theResourceId- Returns:
- true if it exists, false otherwise
-