Interface IoRegistration


public interface IoRegistration
A registration for IO.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    Implementation specific attachment, which might be null.
    boolean
    Cancel the registration.
    boolean
    Returns true if the registration is still valid.
    long
    Submit the IoOps to the registration.
  • Method Details

    • attachment

      <T> T attachment()
      Implementation specific attachment, which might be null.
      Returns:
      attachment.
    • submit

      long submit(IoOps ops)
      Submit the IoOps to the registration.
      Parameters:
      ops - ops.
      Returns:
      an identifier for the operation, which might be unique or not (depending on the implementation).
    • isValid

      boolean isValid()
      Returns true if the registration is still valid. Once cancel() is called this will return false.
      Returns:
      valid.
    • cancel

      boolean cancel()
      Cancel the registration.
      Returns:
      true if cancellation was successful, false otherwise.