|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dna.graph.connector.federation.FederatedRepositorySource
@NotThreadSafe public class FederatedRepositorySource

A RepositorySource for a federated repository.
| Field Summary | |
|---|---|
static int |
DEFAULT_RETRY_LIMIT
The default limit is 0 for retrying connection calls to the underlying source. |
| Constructor Summary | |
|---|---|
FederatedRepositorySource()
Construct a new instance of a RepositorySource for a federated repository. |
|
| Method Summary | |
|---|---|
org.jboss.dna.graph.connector.federation.FederatedWorkspace |
addWorkspace(String workspaceName,
Iterable<Projection> projections,
boolean isDefault)
Add a federated workspace to this source. |
void |
close()
Signal this source that it is no longer needed and should begin the process of reclaiming or closing all resources that it has acquired. |
boolean |
equals(Object obj)
|
RepositorySourceCapabilities |
getCapabilities()
Get the capabilities for this source. |
RepositoryConnection |
getConnection()
Get a connection from this source. |
String |
getName()
Get the name for this repository source. |
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
|
Reference |
getReference()
|
int |
getRetryLimit()
Get the maximum number of retries that may be performed on a given operation when using connections created by this source. |
int |
hashCode()
|
boolean |
hasWorkspace(String workspaceName)
|
void |
initialize(RepositoryContext context)
Initialize this source to use the supplied RepositoryContext, from which this source can obtain the
configuration defining this source,
connections to other sources, and the
execution context. |
boolean |
removeWorkspace(String workspaceName)
Remove the named workspace from the repository source. |
void |
setName(String name)
|
void |
setRetryLimit(int limit)
Set the maximum number of retries that may be performed on a given operation when using connections created by this source. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_RETRY_LIMIT
connection calls to the underlying source.
| Constructor Detail |
|---|
public FederatedRepositorySource()
RepositorySource for a federated repository.
| Method Detail |
|---|
public String getName()
getName in interface RepositorySourceRepositorySource.getName()public void setName(String name)
name - Sets name to the specified value.public int getRetryLimit()
connections created by this source. This value does not constitute a minimum number of retries; in fact, the connection
user is not required to retry any operations.
getRetryLimit in interface RepositorySourceRepositorySource.getRetryLimit()public void setRetryLimit(int limit)
connections created by this source. This value does not constitute a minimum number of retries; in fact, the connection
user is not required to retry any operations.
setRetryLimit in interface RepositorySourcelimit - the maximum number of allowable retries, or 0 if the source has no limitRepositorySource.setRetryLimit(int)public RepositorySourceCapabilities getCapabilities()
getCapabilities in interface RepositorySourceRepositorySource.getCapabilities()
public void initialize(RepositoryContext context)
throws RepositorySourceException
RepositoryContext, from which this source can obtain the
configuration defining this source,
connections to other sources, and the
execution context.
This method may be called each time the configuration changes, allowing the source to update itself.
initialize in interface RepositorySourceRepositorySourceExceptionRepositorySource.initialize(org.jboss.dna.graph.connector.RepositoryContext)
public RepositoryConnection getConnection()
throws RepositorySourceException
getConnection in interface RepositorySourceRepositorySourceException - if there is a problem obtaining a connectionRepositorySource.getConnection()public void close()
connections may still be in use, this method may not necessarily close all
resources immediately.
This is a required method, and must be called when this source is no longer needed if one or more connections have been obtained since the previous call to this method.
Note that calling this method also does not preclude obtaining more connections after this method
is called. If that happens, this source should simply reacquire any resources necessary to provide additional connections,
and this method needs to be called once again.
close in interface RepositorySourceRepositorySource.close()public Reference getReference()
getReference in interface ReferenceableReferenceable.getReference()
public Object getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
throws Exception
getObjectInstance in interface ObjectFactoryExceptionObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context,
java.util.Hashtable)public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
public org.jboss.dna.graph.connector.federation.FederatedWorkspace addWorkspace(String workspaceName,
Iterable<Projection> projections,
boolean isDefault)
workspaceName - the name of the new federated workspaceprojections - the projections that should be used in the workspaceisDefault - true if this workspace should be used as the default workspace, or false otherwise
IllegalArgumentException - if the workspace name or the projections reference are nullpublic boolean removeWorkspace(String workspaceName)
workspaceName - the name of the workspace to remove
IllegalArgumentException - if the workspace name is nullpublic boolean hasWorkspace(String workspaceName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||