Class TSQueueStorageImpl

All Implemented Interfaces:
IPersistence, ISQLWrapper, IQueueStorage, AbstractDataObject, ICBLBeanNGroup, ICBLContainer, IFieldContainer, ISMBean, ISMDataType

public class TSQueueStorageImpl extends QueueRecord implements IQueueStorage
Software Mining implementation of QueueStorage. This class can be replaced by your own queue API via dependency-injection. use by TSQueueManager (TSQ Replacement). the following table will be required for persistent queues (StorageType Auxilary)
 CREATE TABLE CICS_QUEUE (
  --    INDX_FLD_0 INTEGER NOT NULL AUTO_INCREMENT ,
     QUEUE_NAME CHAR(255),
     QUEUE_TYPE CHAR(2),
     ITEM_NUMBER INTEGER DEFAULT -1,
     AUXILARY INTEGER,
     STORAGE_LENGTH INTEGER,
     SYSID INTEGER,
     DATA BLOB
    , KEY (QUEUE_NAME,QUEUE_TYPE,ITEM_NUMBER)
    -- , PRIMARY KEY (INDX_FLD_0)
 );
 
  • Field Details

  • Method Details

    • setPrimitiveQueueType

      public void setPrimitiveQueueType(int newPrimitiveQueueType)
      sets primitiveWQueueType to one of TSQueueManager.TYPE_TEMPORARY_STORAGE (TS) or TSQueueManager.TYPE_TRANSIENT_STORAGE (TD)
      Parameters:
      newPrimitiveQueueType -
    • read

      public int read()
      read the first item from top of the list
      Specified by:
      read in interface IQueueStorage
      Specified by:
      read in interface ISQLWrapper
      Overrides:
      read in class CicsPersistence
      Returns:
      IPersistence.STATUS_SUCCESS if records are found, Otherwise returns other values from IPersistence;
    • next

      public int next()
      Description copied from class: AbstractIndexedFile
      read the next record from file. DOES NOT THROW AtEndException ... instead only the FileStatus will be changed.
      Specified by:
      next in interface IQueueStorage
      Specified by:
      next in interface ISQLWrapper
      Overrides:
      next in class AbstractIndexedFile
      Returns:
      IPersistence.STATUS_SUCCESS if records are found, Otherwise returns other values from IPersistence;
    • insert

      public int insert()
      Insert an item into the queue
      Specified by:
      insert in interface IQueueStorage
      Specified by:
      insert in interface ISQLWrapper
      Overrides:
      insert in class CicsPersistence
    • delete

      public int delete()
      delete the current item
      Specified by:
      delete in interface IQueueStorage
      Specified by:
      delete in interface ISQLWrapper
      Overrides:
      delete in class CicsPersistence
    • delete

      public void delete(int itemNumber)
      delete an item (this facility is for internal use only. MQ does not provide facility to delete individual records - it can only delete entire queues.
    • clear

      public int clear()
      delete all records
      Overrides:
      clear in class AbstractIndexedFile
      Returns:
      when successful it returns IPersistence.STATUS_SUCCESS
    • update

      public int update()
      Description copied from class: AbstractIndexedFile
      Update the current record with the current record structure. If at end of file is reached, it does not throw an exception
      Specified by:
      update in interface IQueueStorage
      Specified by:
      update in interface ISQLWrapper
      Overrides:
      update in class CicsPersistence
    • update

      public void update(int itemNumber)
      Specified by:
      update in interface IQueueStorage
    • toString

      public String toString()
      Overrides:
      toString in class CBLBean
    • setItem

      public void setItem(int itemNumber)
      Description copied from interface: IQueueStorage
      Write to the "Item-Number" field of the queue, and tell the system the next operation is Find and not Read
      Specified by:
      setItem in interface IQueueStorage
    • setItem

      public void setItem(ISMNumeric itemObject)
      Description copied from interface: IQueueStorage
      Write to the "Item-Number" field of the queue, and tell the system the next operation is Find and not Read
      Specified by:
      setItem in interface IQueueStorage
    • getResponse2Code

      public int getResponse2Code()
      Description copied from interface: IQueueStorage
      provides additional information for when errors occur (in addition to the standard RESPONSE-CODE)
      Specified by:
      getResponse2Code in interface IQueueStorage
      Overrides:
      getResponse2Code in class CicsPersistence
      Returns: