org.jboss.dna.connector.federation
Class FederatedRepositoryConfig

java.lang.Object
  extended by org.jboss.dna.connector.federation.FederatedRepositoryConfig
All Implemented Interfaces:
Comparable<FederatedRepositoryConfig>

@Immutable
public class FederatedRepositoryConfig
extends Object
implements Comparable<FederatedRepositoryConfig>

The configuration of a federated repository. The configuration defines, among other things, the set of source projections in the federated repository that each specify how and where content from a source is federated into the unified repository.

Author:
Randall Hauch

Constructor Summary
FederatedRepositoryConfig(String repositoryName, Projection cacheProjection, Iterable<Projection> sourceProjections, CachePolicy defaultCachePolicy)
          Create a federated repository instance.
 
Method Summary
 int compareTo(FederatedRepositoryConfig that)
          
 boolean equals(Object obj)
          
 Projection getCacheProjection()
          Get the projection that defines the cache for this repository.
 CachePolicy getDefaultCachePolicy()
          Get the default cache policy for the repository with the supplied name
 String getName()
          Get the name of this repository
 Problems getProblems()
          Return the problem associated with this configuration.
 List<Projection> getSourceProjections()
          Return the unmodifiable list of source projections.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FederatedRepositoryConfig

public FederatedRepositoryConfig(String repositoryName,
                                 Projection cacheProjection,
                                 Iterable<Projection> sourceProjections,
                                 CachePolicy defaultCachePolicy)
Create a federated repository instance.

Parameters:
repositoryName - the name of the repository
cacheProjection - the projection used for the cache; may not be null
sourceProjections - the source projections; may not be null
defaultCachePolicy - the default cache policy for this repository; may be null
Throws:
IllegalArgumentException - if the name is null or is blank
Method Detail

getName

public String getName()
Get the name of this repository

Returns:
name

getProblems

public Problems getProblems()
Return the problem associated with this configuration. These problems may change at any time, although the returned Problems object is thread-safe.

Returns:
the thread-safe problems for this configuration

getCacheProjection

public Projection getCacheProjection()
Get the projection that defines the cache for this repository. This projection does not exist in the list of source projections.

Returns:
the region used for caching; never null

getSourceProjections

public List<Projection> getSourceProjections()
Return the unmodifiable list of source projections.

Returns:
the source projections; never null and never empty

getDefaultCachePolicy

public CachePolicy getDefaultCachePolicy()
Get the default cache policy for the repository with the supplied name

Returns:
the default cache policy

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

compareTo

public int compareTo(FederatedRepositoryConfig that)

Specified by:
compareTo in interface Comparable<FederatedRepositoryConfig>
See Also:
Comparable.compareTo(java.lang.Object)


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.