Package org.forgerock.opendj.discovery
Interface ServiceDiscoveryMechanism
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ReplicationServiceDiscoveryMechanism,StaticServiceDiscoveryMechanism
Maintains a set of
Partitions keeping it up to date according to a specific discovery mechanism.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Frees any resources in use, mechanism will not be used anymore afterwards.voidDe-registers a listener from notifications on service changes.getPartition(Collection<Dn> baseDNs) Returns the partition.voidRegisters a listener to be notified when changes in the service occur.
-
Method Details
-
close
void close()Frees any resources in use, mechanism will not be used anymore afterwards.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
registerChangeListener
Registers a listener to be notified when changes in the service occur.- Parameters:
listener- the listener to register for notifications
-
deregisterChangeListener
De-registers a listener from notifications on service changes.- Parameters:
listener- the listener to de-register
-
getPartition
Returns the partition.The
Partitionwill only contain servers that are known to expose the provided list of base DNs. An empty list of base DNs will result in all partitions and all servers being returned. In other words, an empty list of base DNs implies that all servers contain exactly the same base DNs.- Parameters:
baseDNs- the baseDNs for which to retrieve the partitions- Returns:
- the partition that can serve the provided base DNs
-