com.ibm.jzos

Class ZLogstreamException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.io.IOException
          • com.ibm.jzos.ZLogstreamException
  • All Implemented Interfaces:
    java.io.Serializable


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

    Since:
    2.1.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ZLogstreamException(java.lang.String msg, java.lang.String logstreamName, int returnCode, int reasonCode)
      Construct a ZLogstreamException.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getLogstreamName() 
      java.lang.String getMessage()
      Get a message string to describe the exception.
      int getReasonCode() 
      int getReturnCode() 
      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.
      boolean isEndReached()
      Answers true if RC=8/0x0807, which occurs when you browse and there are no more records found.
      boolean isStagingDatasetFull()
      Answers true if RC=8/0x0865, which occurs if the staging dataset is full, which can be temporary.
      boolean isStagingFormattingNotFinished()
      Answers true if RC=8/0x0868, which occurs the first time to try to write to a logger.
      boolean isStreamEmpty()
      Answers true if RC=8/0x0846, which occurs when you browseStart and the stream is empty.
      boolean isTokenInvalidError()
      Answers true if RC=8/0x082D, which occurs if the thread that connected to the logstream terminates.
      void setLogstreamName(java.lang.String name)
      Sets the logstreamName
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ZLogstreamException

        public ZLogstreamException(java.lang.String msg,
                                   java.lang.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 Detail

      • getMessage

        public java.lang.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 java.lang.Throwable
      • getLogstreamName

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

        public void setLogstreamName(java.lang.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
� Copyright IBM Corporation 2005, 2022.