Class AFTIPCTopologySubscription

java.lang.Object
org.newsclub.net.unix.tipc.AFTIPCTopologySubscription

@NonNullByDefault public final class AFTIPCTopologySubscription extends Object
An "event subscription" to be used with AFTIPCTopologyWatcher.
Author:
Christian Kohlschütter
  • Field Details

    • TIPC_WAIT_FOREVER

      public static final int TIPC_WAIT_FOREVER
      Special timeout value meaning "never timeout".
      See Also:
    • TIPC_NODE_STATE

      public static final int TIPC_NODE_STATE
      The "node state" cluster topology monitor mode. When TIPC establishes contact with another node, it does internally create a binding {type = TIPC_NODE_STATE, instance = peer node hash number} in the binding table. This makes it possible for applications on a node to keep track of reachable peer nodes at any time. *
      See Also:
  • Constructor Details

  • Method Details

    • toBuffer

      public ByteBuffer toBuffer()
      Converts this subscription message to a new ByteBuffer.
      Returns:
      The new buffer, ready to read from.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toCancellation

      public AFTIPCTopologySubscription toCancellation()
      Creates an AFTIPCTopologySubscription that cancels this subscription. Note that a cancellation cannot be cancelled again.
      Returns:
      The new AFTIPCTopologySubscription.
    • hashCode

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

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • getType

      public int getType()
      Returns the service type.
      Returns:
      The type.
    • getLower

      public int getLower()
      Returns the lower instance value.
      Returns:
      The lower instance value.
    • getUpper

      public int getUpper()
      Returns the upper instance value.
      Returns:
      The upper instance value.
    • getFlags

      Returns the flags.
      Returns:
      The flags.
    • getTimeout

      public int getTimeout()
      Returns the timeout, in seconds (or TIPC_WAIT_FOREVER for "never timeout").
      Returns:
      The timeout.
    • getUsrHandle

      public byte[] getUsrHandle()
      Returns the 8-byte user handle.
      Returns:
      The user handle.
    • isPort

      public boolean isPort()
      Returns true iff the subscription has the AFTIPCTopologySubscription.Flags.TIPC_SUB_PORTS flag set.
      Returns:
      true if this is a "port" subscription.
    • isService

      public boolean isService()
      Returns true iff the subscription has the AFTIPCTopologySubscription.Flags.TIPC_SUB_SERVICE flag set.
      Returns:
      true if this is a "service" subscription.
    • isCancellation

      public boolean isCancellation()
      Returns true iff the subscription has the AFTIPCTopologySubscription.Flags.TIPC_SUB_CANCEL flag set.
      Returns:
      true if this is a "cancellation" subscription request.