Package org.alfresco.repo.node
Interface NodeBulkLoader
-
- All Known Subinterfaces:
NodeDAO
- All Known Implementing Classes:
AbstractNodeDAOImpl,NodeDAOImpl,NodeDAOImpl.MSSQL,NodeDAOImpl.MySQL,NodeDAOImpl.MySQLClusterNDB
public interface NodeBulkLoaderA component that pre-fetches cached data for the given nodes. Client code can use this component when a list ofNodeRefinstances will be processed in a data-intensive manner.- Author:
- Andy Hind, Derek Hulley
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcacheNodes(java.util.List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)Pre-cache data relevant to the given nodes.voidcacheNodesById(java.util.List<java.lang.Long> nodeIds)Pre-cache data relevant to the given nodes.voidclear()FOR TESTING ONLY: Clears out node cache datajava.util.Set<java.lang.Long>getCachedAncestors(java.util.List<java.lang.Long> nodeIds)Gets the current set of cached ancestors of the given list of nodes.voidsetCheckNodeConsistency()Transaction-scope setting to make the Node loader to guarantee the validity of all caches: some cache data will be reloaded; some cache data will be considered safe.
-
-
-
Method Detail
-
getCachedAncestors
java.util.Set<java.lang.Long> getCachedAncestors(java.util.List<java.lang.Long> nodeIds)
Gets the current set of cached ancestors of the given list of nodes.- Parameters:
nodeIds- a list of node IDs to visit- Returns:
- the current set of cached ancestors of the given list of nodes, including the nodes themselves.
-
setCheckNodeConsistency
void setCheckNodeConsistency()
Transaction-scope setting to make the Node loader to guarantee the validity of all caches: some cache data will be reloaded; some cache data will be considered safe.
-
cacheNodes
void cacheNodes(java.util.List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
Pre-cache data relevant to the given nodes. There is no need to split the collection up before calling this method; it is up to the implementations to ensure that batching is done where necessary.- Parameters:
nodeRefs- the nodes that will be cached.
-
cacheNodesById
void cacheNodesById(java.util.List<java.lang.Long> nodeIds)
Pre-cache data relevant to the given nodes. There is no need to split the collection up before calling this method; it is up to the implementations to ensure that batching is done where necessary.- Parameters:
nodeIds- the nodes that will be cached.
-
clear
void clear()
FOR TESTING ONLY: Clears out node cache data
-
-