Package org.forgerock.opendj.discovery
Interface ServiceDiscoveryMechanism
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
ReplicationServiceDiscoveryMechanism
,StaticServiceDiscoveryMechanism
Maintains a set of
Partition
s keeping it up to date according to a specific discovery mechanism.-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Frees any resources in use, mechanism will not be used anymore afterwards.void
De-registers a listener from notifications on service changes.getPartition
(Collection<Dn> baseDNs) Returns the partition.void
Registers 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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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
Partition
will 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
-