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 TypeMethodDescriptionboolean
delete()
Flags this entry for removal returning the entry to absent state.Finds theResourceId
associated with the node, or a result equivalent toOptional.empty()
if no such resource id exists.Gets the internal immutable list of reverse links.boolean
Return true if the content is the original content.boolean
Checks if the list of reverse links are the original set of reverse links.boolean
Links thisResourceEntry
for the suppliedPath
.boolean
Unlinks thisResourceEntry
for the suppliedPath
.Updates the contents of thisResourceEntry
by overriding the suppliedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:ResourceEntry
Return true if the content is the original content.- Specified by:
isOriginalContents
in interfaceResourceEntry
- Returns:
- true if the content is original.
-
isOriginalReversePaths
public boolean isOriginalReversePaths()Description copied from interface:ResourceEntry
Checks if the list of reverse links are the original set of reverse links.- Specified by:
isOriginalReversePaths
in interfaceResourceEntry
- Returns:
- true if the links are original
-
findResourceId
Description copied from interface:ResourceEntry
Finds theResourceId
associated with the node, or a result equivalent toOptional.empty()
if no such resource id exists.- Specified by:
findResourceId
in interfaceResourceEntry
- Returns:
- an
Optional<ResourceId>
containing theResourceId
-
getReversePathsImmutable
Description copied from interface:ResourceEntry
Gets the internal immutable list of reverse links. Will always return an emptySet
if no links exist.- Specified by:
getReversePathsImmutable
in interfaceResourceEntry
- Returns:
- the reverse links, never null.
-
link
Description copied from interface:ResourceEntry
Links thisResourceEntry
for the suppliedPath
.- Specified by:
link
in interfaceResourceEntry
- Parameters:
path
- thePath
to unlink- Returns:
-
unlink
Description copied from interface:ResourceEntry
Unlinks thisResourceEntry
for the suppliedPath
.- Specified by:
unlink
in interfaceResourceEntry
- Parameters:
path
- thePath
to unlink- Returns:
- true if the collection changed as the result of this operation
-
updateResourceContents
Description copied from interface:ResourceEntry
Updates the contents of thisResourceEntry
by overriding the supplied- Specified by:
updateResourceContents
in interfaceResourceEntry
- Returns:
- ResourceContents the contents
-
delete
public boolean delete()Description copied from interface:ResourceEntry
Flags 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:
delete
in interfaceResourceEntry
- Returns:
- true if clearing this entry had any effect
-