public class TopologyCache extends Object
Constructor and Description |
---|
TopologyCache(ADSContext adsContext,
ApplicationTrustManager trustManager,
int timeout)
Constructor of the TopologyCache.
|
Modifier and Type | Method and Description |
---|---|
ADSContext |
getAdsContext()
Returns the adsContext used by this TopologyCache.
|
Set<LocalizableMessage> |
getErrorMessages()
Returns a set of error messages encountered in the TopologyCache.
|
TopologyCacheFilter |
getFilter()
Returns the filter to be used when retrieving information.
|
LinkedHashSet<PreferredConnection> |
getPreferredConnections()
Returns the list of LDAP URLs and connection type that are preferred to be
used to connect to the servers.
|
Set<ServerDescriptor> |
getServers()
Returns a Set containing all the servers that are registered in the ADS.
|
Set<SuffixDescriptor> |
getSuffixes()
Returns a Set containing the suffixes (replication topologies) that could
be retrieved after the last call to reloadTopology.
|
void |
reloadTopology()
Reads the configuration of the registered servers.
|
void |
setPreferredConnections(Set<PreferredConnection> cnx)
Sets the list of LDAP URLs and connection type that are preferred to be
used to connect to the servers.
|
String |
toString() |
public TopologyCache(ADSContext adsContext, ApplicationTrustManager trustManager, int timeout)
adsContext
- the adsContext to the ADS registry.trustManager
- the ApplicationTrustManager that must be used to trust
certificates when we create connections to the registered servers to read
their configuration.timeout
- the timeout to establish the connection in milliseconds.
Use 0
to express no timeout.public void reloadTopology() throws TopologyCacheException
TopologyCacheException
- if there is an issue reading the
configuration of the registered servers.public void setPreferredConnections(Set<PreferredConnection> cnx)
cnx
- the list of preferred connections.public LinkedHashSet<PreferredConnection> getPreferredConnections()
public Set<ServerDescriptor> getServers()
public Set<SuffixDescriptor> getSuffixes()
public TopologyCacheFilter getFilter()
public ADSContext getAdsContext()
public Set<LocalizableMessage> getErrorMessages()
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.