Interface ClusterEvent


  • public interface ClusterEvent
    A ClusterEvent represents an event that has been sent to the cluster, represented by a set of cluster nodes. Sending an event will create an event record in the database. Each cluster node periodically reads this table, sees the available event and handles it by invoking the appropriate cluster event listener. The framework ensures that each cluster node receives the event only once.
    Author:
    ivol
    • Method Detail

      • getId

        String getId()
        The unique identifier of this event (which is a UUID). This ID is a UUID generated upon creation of the event and can be used to identify this specific event.
        Returns:
        The unique identifier of this event
      • getCreated

        long getCreated()
        A long representing the time and date at which the event was created.
        Returns:
        Date time in milliseconds since 1-1-1970
      • getSource

        ClusterNode getSource()
        The cluster node from which the event was sent.
        Returns:
        The cluster node from which the event was sent
      • getTarget

        ClusterNode getTarget()
        The cluster node which received the event (so it is 'this' server). This property is set by the framework just before the ClusterEventListener.onEvent method is invoked.
        Returns:
        cluster node which received the event
      • getService

        String getService()
        The fully qualified classname of the service that the event is targeted for. This service must be an OSGi service implementing ClusterEventListener. The cluster utility service will invoke the onEvent method on the first available instance of this service.
        Returns:
        The fully qualified classname of the service that the event is targeted for
      • getArguments

        String getArguments()
        Properties set by the source which triggered this event. Note that only a single String can be set as argument. If you need more properties or types, you could use a JSON expression.
        Returns:
        Properties set by the source which triggered this event, represented by a single String