|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.dna.graph.requests.processor.RequestProcessor
org.jboss.dna.connector.federation.executor.FederatingCommandExecutor
@NotThreadSafe public class FederatingCommandExecutor

| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jboss.dna.graph.requests.processor.RequestProcessor |
|---|
org.jboss.dna.graph.requests.processor.RequestProcessor.LocationWithDepth |
| Constructor Summary | |
|---|---|
FederatingCommandExecutor(org.jboss.dna.graph.ExecutionContext context,
String sourceName,
List<Projection> sourceProjections,
org.jboss.dna.graph.connectors.RepositoryConnectionFactory connectionFactory)
Create a command executor that federates (merges) the information from multiple sources described by the source projections. |
|
FederatingCommandExecutor(org.jboss.dna.graph.ExecutionContext context,
String sourceName,
Projection cacheProjection,
org.jboss.dna.graph.cache.CachePolicy defaultCachePolicy,
List<Projection> sourceProjections,
org.jboss.dna.graph.connectors.RepositoryConnectionFactory connectionFactory)
Create a command executor that federates (merges) the information from multiple sources described by the source projections. |
|
| Method Summary | |
|---|---|
void |
close()
|
protected FederatedNode |
createFederatedNode(org.jboss.dna.graph.Location location,
List<Contribution> contributions,
boolean updateCache)
|
Projection |
getCacheProjection()
Get the projection defining the cache. |
protected org.jboss.dna.graph.connectors.RepositoryConnection |
getConnection(Projection projection)
|
protected org.jboss.dna.graph.connectors.RepositoryConnection |
getConnectionToCache()
|
protected org.jboss.dna.graph.properties.DateTime |
getCurrentTimeInUtc()
|
protected MergePlan |
getMergePlan(org.jboss.dna.graph.requests.ReadNodeRequest request)
|
protected org.jboss.dna.graph.requests.ReadNodeRequest |
getNode(org.jboss.dna.graph.Location location)
Get the node information from the underlying sources or, if possible, from the cache. |
protected Set<String> |
getOpenConnections()
|
List<Projection> |
getSourceProjections()
Get an unmodifiable list of the immutable source projections. |
protected void |
loadContributionsFromSources(org.jboss.dna.graph.Location location,
Set<String> sourceNames,
List<Contribution> contributions)
Load the node at the supplied location from the sources with the supplied name, returning the information. |
void |
process(org.jboss.dna.graph.requests.CopyBranchRequest request)
|
void |
process(org.jboss.dna.graph.requests.CreateNodeRequest request)
|
void |
process(org.jboss.dna.graph.requests.DeleteBranchRequest request)
|
void |
process(org.jboss.dna.graph.requests.MoveBranchRequest request)
|
void |
process(org.jboss.dna.graph.requests.ReadAllChildrenRequest request)
|
void |
process(org.jboss.dna.graph.requests.ReadAllPropertiesRequest request)
|
void |
process(org.jboss.dna.graph.requests.ReadNodeRequest request)
|
void |
process(org.jboss.dna.graph.requests.UpdatePropertiesRequest request)
|
void |
setMergingStrategy(MergeStrategy mergingStrategy)
|
protected void |
updateCache(FederatedNode mergedNode)
|
| Methods inherited from class org.jboss.dna.graph.requests.processor.RequestProcessor |
|---|
getExecutionContext, getNowInUtc, getSourceName, process, process, process, process, process, process, process, process |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FederatingCommandExecutor(org.jboss.dna.graph.ExecutionContext context,
String sourceName,
List<Projection> sourceProjections,
org.jboss.dna.graph.connectors.RepositoryConnectionFactory connectionFactory)
constructor that takes a cache projection.
context - the execution context in which the executor will be run; may not be nullsourceName - the name of the RepositorySource that is making use of this executor; may not be null or emptysourceProjections - the source projections; may not be nullconnectionFactory - the factory for RepositoryConnection instances
public FederatingCommandExecutor(org.jboss.dna.graph.ExecutionContext context,
String sourceName,
Projection cacheProjection,
org.jboss.dna.graph.cache.CachePolicy defaultCachePolicy,
List<Projection> sourceProjections,
org.jboss.dna.graph.connectors.RepositoryConnectionFactory connectionFactory)
cache projection to identify the
repository source for the cache as well as the rules for
how the paths are mapped in the cache. This cache will be consulted first for the requested information, and will be kept
up to date as changes are made to the federated information.
context - the execution context in which the executor will be run; may not be nullsourceName - the name of the RepositorySource that is making use of this executor; may not be null or emptycacheProjection - the projection used for the cached information; may be null if there is no cachedefaultCachePolicy - the default caching policy that outlines the length of time that information should be cached, or
null if there is no cache or no specific cache policysourceProjections - the source projections; may not be nullconnectionFactory - the factory for RepositoryConnection instances| Method Detail |
|---|
public void setMergingStrategy(MergeStrategy mergingStrategy)
mergingStrategy - Sets mergingStrategy to the specified value.public List<Projection> getSourceProjections()
public Projection getCacheProjection()
protected org.jboss.dna.graph.properties.DateTime getCurrentTimeInUtc()
public void close()
close in class org.jboss.dna.graph.requests.processor.RequestProcessorRequestProcessor.close()
protected org.jboss.dna.graph.connectors.RepositoryConnection getConnectionToCache()
throws org.jboss.dna.graph.connectors.RepositorySourceException
org.jboss.dna.graph.connectors.RepositorySourceException
protected org.jboss.dna.graph.connectors.RepositoryConnection getConnection(Projection projection)
throws org.jboss.dna.graph.connectors.RepositorySourceException
org.jboss.dna.graph.connectors.RepositorySourceExceptionprotected Set<String> getOpenConnections()
public void process(org.jboss.dna.graph.requests.ReadAllChildrenRequest request)
process in class org.jboss.dna.graph.requests.processor.RequestProcessorRequestProcessor.process(org.jboss.dna.graph.requests.ReadAllChildrenRequest)public void process(org.jboss.dna.graph.requests.ReadAllPropertiesRequest request)
process in class org.jboss.dna.graph.requests.processor.RequestProcessorRequestProcessor.process(org.jboss.dna.graph.requests.ReadAllPropertiesRequest)public void process(org.jboss.dna.graph.requests.ReadNodeRequest request)
process in class org.jboss.dna.graph.requests.processor.RequestProcessorRequestProcessor.process(org.jboss.dna.graph.requests.ReadNodeRequest)public void process(org.jboss.dna.graph.requests.CopyBranchRequest request)
process in class org.jboss.dna.graph.requests.processor.RequestProcessorRequestProcessor.process(org.jboss.dna.graph.requests.CopyBranchRequest)public void process(org.jboss.dna.graph.requests.CreateNodeRequest request)
process in class org.jboss.dna.graph.requests.processor.RequestProcessorRequestProcessor.process(org.jboss.dna.graph.requests.CreateNodeRequest)public void process(org.jboss.dna.graph.requests.DeleteBranchRequest request)
process in class org.jboss.dna.graph.requests.processor.RequestProcessorRequestProcessor.process(org.jboss.dna.graph.requests.DeleteBranchRequest)public void process(org.jboss.dna.graph.requests.MoveBranchRequest request)
process in class org.jboss.dna.graph.requests.processor.RequestProcessorRequestProcessor.process(org.jboss.dna.graph.requests.MoveBranchRequest)public void process(org.jboss.dna.graph.requests.UpdatePropertiesRequest request)
process in class org.jboss.dna.graph.requests.processor.RequestProcessorRequestProcessor.process(org.jboss.dna.graph.requests.UpdatePropertiesRequest)
protected org.jboss.dna.graph.requests.ReadNodeRequest getNode(org.jboss.dna.graph.Location location)
throws org.jboss.dna.graph.connectors.RepositorySourceException
location - the location of the node to be returned
org.jboss.dna.graph.connectors.RepositorySourceException
protected FederatedNode createFederatedNode(org.jboss.dna.graph.Location location,
List<Contribution> contributions,
boolean updateCache)
throws org.jboss.dna.graph.connectors.RepositorySourceException
org.jboss.dna.graph.connectors.RepositorySourceException
protected void loadContributionsFromSources(org.jboss.dna.graph.Location location,
Set<String> sourceNames,
List<Contribution> contributions)
throws org.jboss.dna.graph.connectors.RepositorySourceException
location - the location of the node that is to be loadedsourceNames - the names of the sources from which contributions are to be loaded; may be empty or null if all
contributions from all sources are to be loadedcontributions - the list into which the contributions are to be placed
org.jboss.dna.graph.connectors.RepositorySourceExceptionprotected MergePlan getMergePlan(org.jboss.dna.graph.requests.ReadNodeRequest request)
protected void updateCache(FederatedNode mergedNode)
throws org.jboss.dna.graph.connectors.RepositorySourceException
org.jboss.dna.graph.connectors.RepositorySourceException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||