Class ServiceInstancesChangedEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
io.microsphere.spring.cloud.client.event.ServiceInstancesChangedEvent
All Implemented Interfaces:
Serializable

public class ServiceInstancesChangedEvent extends org.springframework.context.ApplicationEvent
An event raised when the instances of one service has been changed.
Author:
Mercy
See Also:
  • Constructor Details

    • ServiceInstancesChangedEvent

      public ServiceInstancesChangedEvent(String serviceName, List<org.springframework.cloud.client.ServiceInstance> serviceInstances)
      Parameters:
      serviceName - The name of service that was changed
      serviceInstances - all service instances
      Throws:
      IllegalArgumentException - if source is null.
  • Method Details

    • getServiceName

      public String getServiceName()
      Returns:
      The name of service that was changed
    • getServiceInstances

      public List<org.springframework.cloud.client.ServiceInstance> getServiceInstances()
      Returns:
      all service instances.
    • processed

      public void processed()
      Mark current event being processed.
    • isProcessed

      public boolean isProcessed()
      Current event has been processed or not.
      Returns:
      if processed, return true, or false