Interface NodeDAO

All Superinterfaces:
NodeBulkLoader
All Known Implementing Classes:
AbstractNodeDAOImpl, NodeDAOImpl, NodeDAOImpl.MSSQL, NodeDAOImpl.MySQL, NodeDAOImpl.MySQLClusterNDB

public interface NodeDAO extends NodeBulkLoader
DAO services for alf_node and related tables
Since:
3.4
Author:
Derek Hulley
  • Method Details

    • getCurrentTransactionCommitTime

      Long getCurrentTransactionCommitTime()
      Returns:
      the commit time of the current transaction entry or null if there have not been any modifications to nodes registered in the transaction.
    • getCurrentTransactionId

      Long getCurrentTransactionId(boolean ensureNew)
      Parameters:
      ensureNew - true to ensure that a new transaction entry is created if the current transaction does not have one.
      Returns:
      Returns the ID of the current transaction entry or null if there have not been any modifications to nodes registered in the transaction and forceNew is false
    • getStore

      Pair<Long,StoreRef> getStore(StoreRef storeRef)
      Get the ID-ref pair for a store
      Returns:
      Returns the ID-reference pair for the store or null if it doesn't exist
    • getStores

      List<Pair<Long,StoreRef>> getStores()
      Fetch a list of all stores in the repository
      Returns:
      Returns a list of stores
    • exists

      boolean exists(StoreRef storeRef)
      Find out if a store exists or not
      Parameters:
      storeRef - the store
      Returns:
      Returns true if the store exists otherwise false
    • newStore

      Pair<Long,NodeRef> newStore(StoreRef storeRef)
      Creates a unique store for the given protocol and identifier combination. The root node is created with the "root" aspect.
      Returns:
      Returns the root node, which is added automatically.
      Throws:
      StoreExistsException - if the store already exists
    • moveStore

      void moveStore(StoreRef oldStoreRef, StoreRef newStoreRef)
      Changes the old store reference to the new store reference.
      Parameters:
      oldStoreRef - the existing store
      newStoreRef - the new store
    • getRootNode

      Pair<Long,NodeRef> getRootNode(StoreRef storeRef)
    • getAllRootNodes

      Set<NodeRef> getAllRootNodes(StoreRef storeRef)
    • exists

      boolean exists(NodeRef nodeRef)
      Find out if a node exists. Unpurged deleted nodes do not count as they are the DAO's concern only.
      Parameters:
      nodeRef - the potentially valid node reference
      Returns:
      Returns true if the node is present and undeleted
    • exists

      boolean exists(Long nodeId)
      Find out if a node exists. Unpurged deleted nodes do not count as they are the DAO's concern only.
      Parameters:
      nodeId - the potentially valid node ID
      Returns:
      Returns true if the node is present and undeleted
    • isInCurrentTxn

      boolean isInCurrentTxn(Long nodeId)
      Returns:
      Returns true if the node was last modified in the current transaction, otherwise false.
      Throws:
      InvalidNodeRefException - if there is no record of the node, past or present
    • getNodeRefStatus

      NodeRef.Status getNodeRefStatus(NodeRef nodeRef)
      Get the current status of the node, including deleted nodes.
      Parameters:
      nodeRef - the node reference
      Returns:
      Returns the current status of the reference. This will only be null if the node never existed or has been purged following deletion.
    • getNodeIdStatus

      NodeRef.Status getNodeIdStatus(Long nodeId)
      Get the current status of the node, including deleted nodes.
      Parameters:
      nodeId - the node id
      Returns:
      Returns the current status of the reference. This will only be null if the node never existed or has been purged following deletion.
    • getNodePair

      Pair<Long,NodeRef> getNodePair(NodeRef nodeRef)
    • getNodePair

      Pair<Long,NodeRef> getNodePair(Long nodeId)
    • getNodeType

      QName getNodeType(Long nodeId)
    • getNodeAclId

      Long getNodeAclId(Long nodeId)
    • newNode

      ChildAssocEntity newNode(Long parentNodeId, QName assocTypeQName, QName assocQName, StoreRef storeRef, String uuid, QName nodeTypeQName, Locale nodeLocale, String childNodeName, Map<QName,Serializable> auditableProperties) throws InvalidTypeException
      Create a new node. Note that allowing the uuid to be assigned by passing in a null is more efficient.
      Parameters:
      parentNodeId - the ID of the parent node (may not be null)
      assocTypeQName - the primary association (may not be null)
      assocQName - the association path (may not be null)
      storeRef - the store to which the node must belong
      uuid - the node store-unique identifier, or null to assign a GUID
      nodeTypeQName - the type of the node
      nodeLocale - the locale of the node
      childNodeName - the cm:name of the child node or null to use the node's UUID
      auditableProperties - a map containing any cm:auditable properties for the node
      Returns:
      Returns the details of the child association created
      Throws:
      InvalidTypeException - if the node type is invalid or if the node type is not a valid real node
      NodeExistsException - if the target reference is already taken by a live node
    • moveNode

      Pair<Pair<Long,ChildAssociationRef>,Pair<Long,NodeRef>> moveNode(Long childNodeId, Long newParentNodeId, QName assocTypeQName, QName assocQName)
      Update a node's primary association, giving it a new parent and new association parameters.

      **NEW**: If the parent node's store differs from the child node's store, then a new child node's is created.

      Parameters:
      childNodeId - the child node that is moving
      newParentNodeId - the new parent node (may not be null)
      assocTypeQName - the new association type or null to keep the existing type
      assocQName - the new association qname or null to keep the existing name
      Returns:
      Returns the (first) new association reference and new child reference (second)
      Throws:
      NodeExistsException - if the target UUID of the move (in case of a store move) already exists
    • touchNodes

      int touchNodes(Long txnId, List<Long> nodeIds)
      Update the transaction associated with a lust of nodes
      Parameters:
      txnId - - the tx id to set
      nodeIds - - the nodes to update
      Returns:
      the number of nodes touched
    • updateNode

      boolean updateNode(Long nodeId, QName nodeTypeQName, Locale nodeLocale)
      Parameters:
      nodeTypeQName - the new type QName for the node or null to keep the existing one
      nodeLocale - the new locale for the node or null to keep the existing one
      Returns:
      true if any changes were made
    • setNodeAclId

      void setNodeAclId(Long nodeId, Long aclId)
    • setPrimaryChildrenSharedAclId

      void setPrimaryChildrenSharedAclId(Long primaryParentNodeId, Long optionalOldSharedAlcIdInAdditionToNull, Long newSharedAclId)
    • deleteNode

      void deleteNode(Long nodeId)
      Deletes the node and all entities. Note that the node entry will still exist and be associated with a live transaction.
    • purgeNodes

      int purgeNodes(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)
      Purge deleted nodes where their participating transactions are in-between the given time interval.
      Parameters:
      fromTxnCommitTimeMs - from commit time
      toTxnCommitTimeMs - to commit time
      Returns:
      Returns the number of deleted nodes purged
    • getNodeProperty

      Serializable getNodeProperty(Long nodeId, QName propertyQName)
    • getNodeProperties

      Map<QName,Serializable> getNodeProperties(Long nodeId)
    • setNodeProperties

      boolean setNodeProperties(Long nodeId, Map<QName,Serializable> properties)
    • addNodeProperty

      boolean addNodeProperty(Long nodeId, QName qname, Serializable value)
    • addNodeProperties

      boolean addNodeProperties(Long nodeId, Map<QName,Serializable> properties)
    • removeNodeProperties

      boolean removeNodeProperties(Long nodeId, Set<QName> propertyQNames)
    • setModifiedDate

      boolean setModifiedDate(Long nodeId, Date date)
      Deprecated.
      Use setModifiedProperties(Long, Date, String) to also change the cm:modifier property
      Pull the cm:modified up to the current time without changing any other cm:auditable properties. The change may be done in the current transaction or in a later transaction.
      Parameters:
      nodeId - the node to change
      date - the date to set for cm:modified
      Returns:
      Returns true if the cm:modified property was actually set
    • setModifiedProperties

      boolean setModifiedProperties(Long nodeId, Date modifiedDate, String modifiedBy)
      Pull the cm:modified up to the current time without changing any other cm:auditable properties. The change may be done in the current transaction or in a later transaction.
      Parameters:
      nodeId - the node to change
      modifiedDate - the date to set for cm:modified
      modifiedBy - the name to set for cm:modifier
      Returns:
      Returns true if the cm:modified and cm:modifier properties were actually set
    • getNodeAspects

      Set<QName> getNodeAspects(Long nodeId)
    • hasNodeAspect

      boolean hasNodeAspect(Long nodeId, QName aspectQName)
    • addNodeAspects

      boolean addNodeAspects(Long nodeId, Set<QName> aspectQNames)
    • removeNodeAspects

      boolean removeNodeAspects(Long nodeId)
    • removeNodeAspects

      boolean removeNodeAspects(Long nodeId, Set<QName> aspectQNames)
    • getNodesWithAspects

      void getNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)
      Get nodes with aspects between the given ranges
      Parameters:
      aspectQNames - the aspects that must be on the nodes
      minNodeId - the minimum node ID (inclusive)
      maxNodeId - the maximum node ID (exclusive)
      resultsCallback - callback to process results
    • getNodesWithAspects

      void getNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, Long maxNodeId, boolean ordered, NodeDAO.NodeRefQueryCallback resultsCallback)
      Get nodes with aspects between the given ranges, ordering the results optionally
      Parameters:
      aspectQNames - the aspects that must be on the nodes
      minNodeId - the minimum node ID (inclusive)
      maxNodeId - the maximum node ID (exclusive)
      ordered - if the results are to be ordered by nodeID
      resultsCallback - callback to process results
    • newNodeAssoc

      Long newNodeAssoc(Long sourceNodeId, Long targetNodeId, QName assocTypeQName, int assocIndex)
      Create a new association
      Parameters:
      sourceNodeId - the association source
      targetNodeId - the association target
      assocTypeQName - the type of the association (will be resolved to an ID)
      assocIndex - the index of the new association (-1 indicates next value)
    • setNodeAssocIndex

      void setNodeAssocIndex(Long id, int assocIndex)
      Update an existing assoc's index.
      Parameters:
      id - the association ID
      assocIndex - the new index (greater than 0)
    • removeNodeAssoc

      int removeNodeAssoc(Long sourceNodeId, Long targetNodeId, QName assocTypeQName)
      Remove a specific node association
      Parameters:
      sourceNodeId - the source node ID
      targetNodeId - the target node id
      assocTypeQName - the node association QName
      Returns:
      Returns the number of associations removed
    • removeNodeAssocs

      int removeNodeAssocs(List<Long> ids)
      Remove all node associations of given IDs
      Parameters:
      ids - the IDs of the associations to remove
      Returns:
      Returns the number of associations removed
    • getNodeAssocsToAndFrom

      Collection<Pair<Long,AssociationRef>> getNodeAssocsToAndFrom(Long nodeId)
      Parameters:
      nodeId - the source or target of the associations
      Returns:
      Returns all the node associations where the node is the source or target
    • getSourceNodeAssocs

      Collection<Pair<Long,AssociationRef>> getSourceNodeAssocs(Long targetNodeId, QName typeQName)
      Parameters:
      targetNodeId - the target of the association
      typeQName - the type of the association (optional)
      Returns:
      Returns all the node associations where the node is the target
    • getTargetNodeAssocs

      Collection<Pair<Long,AssociationRef>> getTargetNodeAssocs(Long sourceNodeId, QName typeQName)
      Parameters:
      sourceNodeId - the source of the association
      typeQName - the type of the association (optional)
      Returns:
      Returns all the node associations where the node is the source
    • getTargetAssocsByPropertyValue

      Collection<Pair<Long,AssociationRef>> getTargetAssocsByPropertyValue(Long sourceNodeId, QName typeQName, QName propertyQName, Serializable propertyValue)
      Get target associations by type of the association, property name and value.
      Parameters:
      sourceNodeId - the source of the association
      typeQName - the type of the association (null allowed)
      propertyQName - property QName (null allowed)
      propertyValue - property value (null allowed only if the propertyQName is null)
      Returns:
      Returns all the node associations where the node is the source.
    • getNodeAssocOrNull

      Pair<Long,AssociationRef> getNodeAssocOrNull(Long assocId)
      Returns:
      Returns a specific node association with the given ID or null if it doesn't exist
    • getNodeAssoc

      Pair<Long,AssociationRef> getNodeAssoc(Long assocId)
      Returns:
      Returns a specific node association with the given ID
      Throws:
      org.springframework.dao.ConcurrencyFailureException - if the association ID is invalid
    • newChildAssoc

      Pair<Long,ChildAssociationRef> newChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, String childNodeName)
      Create a new child association. The unique enforcement for cm:name will be done as part of the association creation i.e. there is no need to update it after the fact.
      Parameters:
      childNodeName - the cm:name to apply to the association
      Returns:
      Returns the persisted and filled association's ID
    • deleteChildAssoc

      void deleteChildAssoc(Long assocId)
      Parameters:
      assocId - the ID of the child association to delete
    • setChildAssocIndex

      int setChildAssocIndex(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, int index)
      Sets the association index ordering.
      Parameters:
      parentNodeId - the parent node ID
      childNodeId - the child node ID
      assocTypeQName - the association type
      assocQName - the association path qualified name
      index - the new index
      Returns:
      Returns the number of associations modified
    • setChildAssocsUniqueName

      void setChildAssocsUniqueName(Long childNodeId, String childName)
      Bulk-update all unique name (cm:name) index for parent associations of a given node.
      Parameters:
      childNodeId - the child node who's name is changing
      childName - the new cm:name value
    • getChildAssoc

      Pair<Long,ChildAssociationRef> getChildAssoc(Long assocId)
      Get a specific association
      Parameters:
      assocId - the ID of the association
      Returns:
      Returns the association reference or null if it doesn't exist
    • getChildAssoc

      Pair<Long,ChildAssociationRef> getChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName)
      Get a specific child association given all the determining data.

      The implementation may find multiple entries (there is no constraint to prevent it) although the cm:name constraint will normally prevent the association from being created twice. The lowest ID association will always be returned and the others will be cleaned up if the transaction is read-write.

      Returns:
      Returns a matching association or null if one was not found.
    • getChildAssocs

      void getChildAssocs(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, Boolean sameStore, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
      Get the child associations of a given parent node, optionally filtering on association QName and association type QName.

      This is an efficient query for node paths.

      Parameters:
      parentNodeId - the parent node ID
      childNodeId - the child node ID to filter on; null for no filtering
      assocTypeQName - the association type qname to filter on; null for no filtering
      assocQName - the association qname to filter on; null for no filtering
      isPrimary - filter for primary (true) or secondary associations; null for no filtering.
      sameStore - null to ignore, true to only get children that are in the same store as the parent, or false to only get children that are in a different store from the parent.
      resultsCallback - the callback that will be called with the results
    • getChildAssocs

      void getChildAssocs(Long parentNodeId, QName assocTypeQName, QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
      Gets the first n child associations of a given parent node, optionally filtering on association QName and association type QName.

      This is an efficient query for node paths.

      Parameters:
      parentNodeId - the parent node ID
      assocTypeQName - the association type qname to filter on; null for no filtering
      assocQName - the association qname to filter on; null for no filtering
      maxResults - the maximum number of results to return. The query will be terminated efficiently after that number of results
      resultsCallback - the callback that will be called with the results
    • getChildAssocs

      void getChildAssocs(Long parentNodeId, Set<QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
      Get the child associations of a given parent node, optionally filtering on type QName.
      Parameters:
      parentNodeId - the parent node ID
      assocTypeQNames - the association type qnames to filter on; null for no filtering
      resultsCallback - the callback that will be called with the results
    • getChildAssoc

      Pair<Long,ChildAssociationRef> getChildAssoc(Long parentNodeId, QName assocTypeQName, String childName)
      Get a child association for given parent node, association type and child node name (cm:name).
      Parameters:
      parentNodeId - the parent Node ID
      assocTypeQName - the association type to filter on
      childName - the cm:name value to filter on
      Returns:
      Returns an association matching the given parent, type and child name (cm:name) - or null if not found
    • getChildAssocs

      void getChildAssocs(Long parentNodeId, QName assocTypeQName, Collection<String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
      Get the child associations of a given parent node, filtering on type QName and the cm:name of the child nodes.

      NOTE: This method only works if the association type fundamentally supports unique-name enforcement.

      Parameters:
      parentNodeId - the parent node
      assocTypeQName - the type of the association to check; or null for no filtering. If the association type is not specified, then the same child node may be included several times.
      childNames - the names of the child nodes (cm:name). These will be matched exactly.
      resultsCallback - the callback that will be called with the results
    • getChildAssocsByChildTypes

      void getChildAssocsByChildTypes(Long parentNodeId, Set<QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
    • getChildAssocsWithoutParentAssocsOfType

      void getChildAssocsWithoutParentAssocsOfType(Long parentNodeId, QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
      Gets the set of child associations of a certain parent node without parent associations of a certain type to other nodes with the same parent! In effect the 'orphans' with respect to a certain association type.
      Parameters:
      parentNodeId - the parent node ID
      assocTypeQName - the association type QName
      resultsCallback - the callback that will be called with the results
    • selectChildAssocsWithoutNodeAssocsOfTypes

      List<Node> selectChildAssocsWithoutNodeAssocsOfTypes(Long parentNodeId, Long minNodeId, Long maxNodeId, Set<QName> assocToExcludeTypeQNames)
      Parameters:
      parentNodeId - the parent node id
      minNodeId - the minimum node ID (inclusive), null for no limitation on the minimum value of the node id
      maxNodeId - the maximum node ID (exclusive), null for no limitation on the maximum value of the node id
      assocToExcludeTypeQNames - the node associations to exclude, null for no filtering of the associations types
      Returns:
      list of child nodes
    • getPrimaryParentAssoc

      Pair<Long,ChildAssociationRef> getPrimaryParentAssoc(Long childNodeId)
      Finds the association between the node's primary parent and the node itself
      Returns:
      Returns the primary (defining) association or null if it is a root node
    • getParentAssocs

      void getParentAssocs(Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
      Get the parent association of a given parent node, optionally filtering on association QName and association type QName.

      This is an efficient query for node paths.

      Parameters:
      childNodeId - the child node ID
      assocTypeQName - the association type qname to filter on; null for no filtering
      assocQName - the association qname to filter on; null for no filtering
      isPrimary - filter for primary (true) or secondary associations; null for no filtering.
      resultsCallback - the callback that will be called with the results
    • getPrimaryChildrenAcls

      List<NodeIdAndAclId> getPrimaryChildrenAcls(Long nodeId)
      Fetch all primary child node IDs and corresponding ACL IDs.
      Parameters:
      nodeId - the parent node ID
      Returns:
      Returns a list of Node ID - ACL ID pairs
    • getPaths

      List<Path> getPaths(Pair<Long,NodeRef> nodePair, boolean primaryOnly) throws InvalidNodeRefException
      Build the paths for a node. When searching for primaryOnly == true, checks that there is exactly one path.
      Parameters:
      nodePair - the leave or child node to start with
      primaryOnly - true to follow only primary parent associations
      Throws:
      InvalidNodeRefException
    • cycleCheck

      void cycleCheck(Long nodeId)
      Perform a check for cyclic relationships
    • getMaxTxnIdByCommitTime

      Long getMaxTxnIdByCommitTime(long maxCommitTime)
      Retrieves the maximum transaction ID for which the commit time is less than the given time.
      Parameters:
      maxCommitTime - the max commit time (ms)
      Returns:
      the last transaction on or before the given time
    • getTxnById

      Transaction getTxnById(Long txnId)
      Retrieves a specific transaction.
      Parameters:
      txnId - the unique transaction ID.
      Returns:
      the requested transaction or null
    • getTransactionCount

      int getTransactionCount()
    • getTxnChangesForStore

      List<NodeRef.Status> getTxnChangesForStore(StoreRef storeRef, Long txnId)
      Returns:
      Returns the node statuses for a transaction, limited to the store
    • getTxnChanges

      List<NodeRef.Status> getTxnChanges(Long txnId)
      Returns:
      Returns the node statuses for a transaction, regardless of store
    • getTxnsUnused

      List<Long> getTxnsUnused(Long minTxnId, long maxCommitTime, int count)
    • deleteTxnsUnused

      int deleteTxnsUnused(long fromCommitTime, long toCommitTime)
      Remove unused transactions from commit time 'fromCommitTime' to commit time 'toCommitTime'
      Parameters:
      fromCommitTime - delete unused transactions from commit time
      toCommitTime - delete unused transactions to commit time
      Returns:
      int
    • purgeTxn

      void purgeTxn(Long txnId)
    • getMinTxnCommitTime

      Long getMinTxnCommitTime()
      Returns:
      Returns the minimum commit time or null if there are no transactions
    • getMaxTxnCommitTime

      Long getMaxTxnCommitTime()
      Returns:
      Returns the maximum commit time or null if there are no transactions
    • getMinTxnCommitTimeForDeletedNodes

      Long getMinTxnCommitTimeForDeletedNodes()
      Returns:
      Returns the minimum commit time for deleted nodes or null if there are no transactions
    • getMinTxnId

      Long getMinTxnId()
      Returns:
      Returns the minimum id or 0 if there are no transactions
    • getMinUnusedTxnCommitTime

      Long getMinUnusedTxnCommitTime()
      Returns:
      the commit time of the oldest unused transaction
    • getMaxTxnId

      Long getMaxTxnId()
      Returns:
      Returns the maximum id or 0 if there are no transactions
    • getMinNodeId

      Long getMinNodeId()
      Returns:
      Returns the minimum node id or 0 if there are no nodes
    • getMaxNodeId

      Long getMaxNodeId()
      Returns:
      Returns the maximum node id or 0 if there are no nodes
    • getNodeIdsIntervalForType

      Pair<Long,Long> getNodeIdsIntervalForType(QName type, Long startTxnTime, Long endTxnTime)
      Returns the [minId, maxId] interval for nodes of a type, with the transaction time in the given window time.
      Parameters:
      type - the node type
      startTxnTime - the starting transaction time, null is allowed, case in which no minimum transaction time is considered
      endTxnTime - the end transaction time, null is allowed, case in which no maximum transaction time is considered
      Returns:
      the interval, as a pair
    • getChildAssocsByPropertyValue

      void getChildAssocsByPropertyValue(Long parentNodeId, QName propertyQName, Serializable nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
      Select children by property values
    • selectAssocsNotLinkedByTwoOtherAssocs

      List<String> selectAssocsNotLinkedByTwoOtherAssocs(Long parentNodeId)
    • selectNodePropertiesByTypes

      List<NodePropertyEntity> selectNodePropertiesByTypes(Set<QName> qnames)
      Used by the re-encryptor to re-encrypt encryptable properties with a new encryption key.
    • selectNodePropertiesByDataType

      List<NodePropertyEntity> selectNodePropertiesByDataType(QName dataType, long minNodeId, long maxNodeId)
      Select all node properties that are between two node IDs and of the given actual type
      Parameters:
      dataType - the actual, original type of the property, as given by one of the constants on DataTypeDefinition
      minNodeId - the minimum node ID (inclusive)
      maxNodeId - the maximum node ID (exclusive)
    • countChildAssocsByParent

      int countChildAssocsByParent(Long parentNodeId, boolean isPrimary)
      Counts the number of child associations directly under parentNodeId.
      Parameters:
      parentNodeId - the parent node id
      isPrimary - count just primary associations?
    • getMinTxInNodeIdRange

      Long getMinTxInNodeIdRange(Long fromNodeId, Long toNodeId)
      Gets the minimum commit time from transactions including a node id in the range [fromNodeId:toNodeId]
      Parameters:
      fromNodeId - Initial node id
      toNodeId - Final node id
      Returns:
      minimum commit time
    • getMaxTxInNodeIdRange

      Long getMaxTxInNodeIdRange(Long fromNodeId, Long toNodeId)
      Gets the maximum commit time from transactions including a node id in the range [fromNodeId:toNodeId]
      Parameters:
      fromNodeId - Initial node id
      toNodeId - Final node id
      Returns:
      maximum commit time
    • getNextTxCommitTime

      Long getNextTxCommitTime(Long fromCommitTime)
      Gets the next commit time from [fromCommitTime]
      Parameters:
      fromCommitTime - Initial commit time
      Returns:
      next commit time
    • selectDeletedNodesByCommitTime

      default Iterator<Long> selectDeletedNodesByCommitTime(long maxCommitTime)
      Parameters:
      maxCommitTime -
      Returns:
      Iterator over node ids
    • purgeDeletedNodes

      default List<String> purgeDeletedNodes(long minAge, int deleteBatchSize)
      Purge the nodes marked as deleted
      Parameters:
      minAge -
      deleteBatchSize -
      Returns:
      the count of nodes deleted in each batch
    • selectUnusedTransactionsByCommitTime

      default Iterator<Long> selectUnusedTransactionsByCommitTime(long maxCommitTime)
      Parameters:
      maxCommitTime -
      Returns:
      Iterator over transaction ids
    • purgeEmptyTransactions

      default List<String> purgeEmptyTransactions(long minAge, int deleteBatchSize)
      Purge the transactions of purged nodes
      Parameters:
      minAge -
      deleteBatchSize -
      Returns:
      the count of transactions deleted in each batch