Interface LocalTransport


public interface LocalTransport
A local transport is used for sending messages only to single (or all) members of the same host.
Since:
5.2.0
  • Method Details

    • init

      LocalTransport init(TP transport) throws Exception
      Calls after the local transport has been created.
      Parameters:
      transport - A reference to TP
      Throws:
      Exception
    • start

      LocalTransport start() throws Exception
      Throws:
      Exception
    • stop

    • destroy

      LocalTransport destroy()
    • resetStats

      LocalTransport resetStats()
    • viewChange

      LocalTransport viewChange(View v)
    • isLocalMember

      boolean isLocalMember(Address addr)
      Returns true if addr is a local member, false otherwise
    • sendTo

      void sendTo(Address dest, byte[] buf, int offset, int length) throws Exception
      Sends a message to a given local member. The caller should check before whether dest is a local member; an implementation is not required to do so, but may nevertheless perform the check (and throw an exception if the destination is not local).
      Parameters:
      dest - The address of the member to which to send the message. Must be non-null
      buf - The buffer to send
      offset - The offset at which the data starts
      length - The number of bytes to send
      Throws:
      Exception - Thrown when the send failed, e.g. when dest isn't a local address.
    • sendToAll

      void sendToAll(byte[] buf, int offset, int length) throws Exception
      Sends a message to all local members.
      Parameters:
      buf - The buffer to send
      offset - The offset at which the data starts
      length - The number of bytes to send
      Throws:
      Exception - Thrown when the send failed.