Class MastershipEvent

    • Constructor Detail

      • MastershipEvent

        public MastershipEvent​(MastershipEvent.Type type,
                               DeviceId device,
                               MastershipInfo mastershipInfo)
        Creates an event of a given type and for the specified device, role information, and the current time.
        Parameters:
        type - mastership event type
        device - event device subject
        mastershipInfo - mastership info
      • MastershipEvent

        public MastershipEvent​(MastershipEvent.Type type,
                               DeviceId device,
                               MastershipInfo mastershipInfo,
                               long time)
        Creates an event of a given type and for the specified device, master, and time.
        Parameters:
        type - mastership event type
        device - event device subject
        mastershipInfo - mastership information
        time - occurrence time
    • Method Detail

      • mastershipInfo

        public MastershipInfo mastershipInfo()
        Returns the mastership info.
        Returns:
        the mastership info
      • roleInfo

        @Deprecated
        public RoleInfo roleInfo()
        Deprecated.
        since 1.14
        Returns the current role state for the subject.
        Returns:
        RoleInfo associated with Device ID subject
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object