Class AbstractResourceEntry
java.lang.Object
dev.getelements.elements.rt.transact.AbstractResourceEntry
- All Implemented Interfaces:
ResourceEntry,AutoCloseable
- Direct Known Subclasses:
NullResourceEntry,UnixFSResourceEntryBase
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.getelements.elements.rt.transact.ResourceEntry
ResourceEntry.OperationalStrategy -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractResourceEntry(ResourceEntry.OperationalStrategy operationalStrategy) -
Method Summary
Modifier and TypeMethodDescriptionbooleandelete()Flags this entry for removal returning the entry to absent state.Finds theResourceIdassociated with the node, or a result equivalent toOptional.empty()if no such resource id exists.Gets the internal immutable list of reverse links.booleanReturn true if the content is the original content.booleanChecks if the list of reverse links are the original set of reverse links.booleanLinks thisResourceEntryfor the suppliedPath.booleanUnlinks thisResourceEntryfor the suppliedPath.Updates the contents of thisResourceEntryby overriding the suppliedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.rt.transact.ResourceEntry
close, findOriginalResourceContents, findOriginalResourceId, findResourceContents, flush, getOriginalResourceId, getOriginalReversePathsImmutable, getResourceId, isAbsent, isPresent, loadResourceContents
-
Field Details
-
operationalStrategy
-
-
Constructor Details
-
AbstractResourceEntry
-
-
Method Details
-
isOriginalContents
public boolean isOriginalContents()Description copied from interface:ResourceEntryReturn true if the content is the original content.- Specified by:
isOriginalContentsin interfaceResourceEntry- Returns:
- true if the content is original.
-
isOriginalReversePaths
public boolean isOriginalReversePaths()Description copied from interface:ResourceEntryChecks if the list of reverse links are the original set of reverse links.- Specified by:
isOriginalReversePathsin interfaceResourceEntry- Returns:
- true if the links are original
-
findResourceId
Description copied from interface:ResourceEntryFinds theResourceIdassociated with the node, or a result equivalent toOptional.empty()if no such resource id exists.- Specified by:
findResourceIdin interfaceResourceEntry- Returns:
- an
Optional<ResourceId>containing theResourceId
-
getReversePathsImmutable
Description copied from interface:ResourceEntryGets the internal immutable list of reverse links. Will always return an emptySetif no links exist.- Specified by:
getReversePathsImmutablein interfaceResourceEntry- Returns:
- the reverse links, never null.
-
link
Description copied from interface:ResourceEntryLinks thisResourceEntryfor the suppliedPath.- Specified by:
linkin interfaceResourceEntry- Parameters:
path- thePathto unlink- Returns:
-
unlink
Description copied from interface:ResourceEntryUnlinks thisResourceEntryfor the suppliedPath.- Specified by:
unlinkin interfaceResourceEntry- Parameters:
path- thePathto unlink- Returns:
- true if the collection changed as the result of this operation
-
updateResourceContents
Description copied from interface:ResourceEntryUpdates the contents of thisResourceEntryby overriding the supplied- Specified by:
updateResourceContentsin interfaceResourceEntry- Returns:
- ResourceContents the contents
-
delete
public boolean delete()Description copied from interface:ResourceEntryFlags this entry for removal returning the entry to absent state. If this entry is absent this will have no effect and the method will return false. Additionally, the operational strategy associated with this entry may opt to do nothing and return false as well.- Specified by:
deletein interfaceResourceEntry- Returns:
- true if clearing this entry had any effect
-