Class ServiceInstancesChangedListener
java.lang.Object
org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener
TODO, refactor to move revision-metadata mapping to ServiceDiscovery. Instances should have already been mapped with metadata when reached here.
The operations of ServiceInstancesChangedListener should be synchronized.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionServiceInstancesChangedListener(Set<String> serviceNames, ServiceDiscovery serviceDiscovery) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListenerAndNotify(URL url, NotifyListener listener) voiddestroy()Since this listener is shared among interfaces, destroy this listener only when all interface listener are unsubscribedbooleanGet the correlative service nameinthashCode()booleanbooleanvoidvoidremoveListener(String serviceKey, NotifyListener notifyListener)
-
Constructor Details
-
ServiceInstancesChangedListener
-
-
Method Details
-
onEvent
- Parameters:
event-ServiceInstancesChangedEvent
-
addListenerAndNotify
-
removeListener
-
hasListeners
public boolean hasListeners() -
getServiceNames
Get the correlative service name- Returns:
- the correlative service name
-
getAllInstances
-
destroy
public void destroy()Since this listener is shared among interfaces, destroy this listener only when all interface listener are unsubscribed -
isDestroyed
public boolean isDestroyed() -
equals
-
hashCode
public int hashCode()
-