Module ibm.jzos
Package com.ibm.jzos

Class ZLogstreamException

All Implemented Interfaces:
Serializable

public class ZLogstreamException extends IOException
A customized IOException to carry return codes for ZLogstream errors.

Since:
2.1.0
See Also:
  • Constructor Details

    • ZLogstreamException

      public ZLogstreamException(String msg, String logstreamName, int returnCode, int reasonCode)
      Construct a ZLogstreamException.
      Parameters:
      msg - the message from the point where the error occurred
      logstreamName - the name of the logstream
      returnCode - the return code from the IXGXXX macro service
      reasonCode - the reason code from the IXGXXX macro service
  • Method Details

    • getMessage

      public String getMessage()
      Get a message string to describe the exception. This includes the original source message from the detecting routine, as well as errno, errno2, and last_op if errno is not 0.
      Overrides:
      getMessage in class Throwable
    • getLogstreamName

      public String getLogstreamName()
      Returns:
      String - the name of the logstream
    • setLogstreamName

      public void setLogstreamName(String name)
      Sets the logstreamName
    • getReturnCode

      public int getReturnCode()
      Returns:
      int - the value of the IXGXXX return code
    • getReasonCode

      public int getReasonCode()
      Returns:
      int - the value of the IXGXXX reason code
    • isTokenInvalidError

      public boolean isTokenInvalidError()
      Answers true if RC=8/0x082D, which occurs if the thread that connected to the logstream terminates.
    • isStagingFormattingNotFinished

      public boolean isStagingFormattingNotFinished()
      Answers true if RC=8/0x0868, which occurs the first time to try to write to a logger.
    • isStagingDatasetFull

      public boolean isStagingDatasetFull()
      Answers true if RC=8/0x0865, which occurs if the staging dataset is full, which can be temporary.
    • isStreamEmpty

      public boolean isStreamEmpty()
      Answers true if RC=8/0x0846, which occurs when you browseStart and the stream is empty. This exception is automatically caught in ZLogstream.readCursor(byte[], int, boolean).
      Since:
      2.4.0
    • isEndReached

      public boolean isEndReached()
      Answers true if RC=8/0x0807, which occurs when you browse and there are no more records found. This exception is automatically caught in ZLogstream.readCursor(byte[], int, boolean).
      Since:
      2.4.0
    • isBlockNotFound

      public boolean isBlockNotFound()
      Answers true if RC=8/0x0804, which occurs when you try to reference a block by blockid or search by timestamp and a matching block is not found.
      Since:
      2.4.0