Class TSQueueStorageImpl
java.lang.Object
com.softwaremining.wrappers.CBLBean
com.softwaremining.wrappers.AbstractBasePersistence
com.softwaremining.sql.AbstractIndexedFile
com.softwaremining.sql.SQLWrapper
com.softwaremining.vendors.cics.CicsPersistence
com.softwaremining.vendors.cics.queue.QueueRecord
com.softwaremining.vendors.cics.queue.TSQueueStorageImpl
- All Implemented Interfaces:
IPersistence
,ISQLWrapper
,IQueueStorage
,AbstractDataObject
,ICBLBeanNGroup
,ICBLContainer
,IFieldContainer
,ISMBean
,ISMDataType
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 Summary
Fields inherited from class com.softwaremining.vendors.cics.queue.QueueRecord
field_Auxilary, field_Data, field_ItemNumber, field_QueueName, field_QueueType, field_StorageLength, field_Sysid, group_CicsQueue, group_DataGroup, group_QueueKey
Fields inherited from class com.softwaremining.sql.SQLWrapper
connection, nativeKeys, openMode, postFixTableNameToImplicitDatabaseKey, resultSet, sequentialKeyGeneration, suppressNextReadCurrent
Fields inherited from class com.softwaremining.sql.AbstractIndexedFile
delegateDAO
Fields inherited from class com.softwaremining.wrappers.AbstractBasePersistence
fileName, ownerClassName, status
Fields inherited from class com.softwaremining.wrappers.CBLBean
EBCDIC_JIT_PD_SUPPORT_FOR_SEQ_FILES, INDEX_FOR_NON_ARRAY_VERSION_OF_FIELD, INDEX_ZERO, tmp_lengthofAssignedValue, totalRuntime_allocate, totalRuntime_calcFieldOffsets, totalRuntime_getMemoryPosition, totalRuntime_setFieldFormatted
Fields inherited from interface com.softwaremining.sql.IPersistence
ACCESS_MODE_DYNAMIC, ACCESS_MODE_RANDOM, ACCESS_MODE_SEQUENTIAL, ASCENDING_RECORD_KEY, CONDITION_TYPE_EQUALS, CONDITION_TYPE_GREATER, CONDITION_TYPE_GREATER_OR_EQUALS, CONDITION_TYPE_IGNORE, CONDITION_TYPE_IGNORE_FOR_SQL_LIKE, CONDITION_TYPE_LESS, CONDITION_TYPE_LESS_OR_EQUALS, CONDITION_TYPE_LIKE, CONDITION_TYPE_NO_CONDITION, CONDITION_TYPE_NOT_ASSIGNED, DESCENDING_RECORD_KEY, OPEN_MODE_EXTEND, OPEN_MODE_I_O, OPEN_MODE_INPUT, OPEN_MODE_NOT_OPENED, OPEN_MODE_OUTPUT, STATUS_AT_END, STATUS_DUP_KEY, STATUS_FAILED_CLOSING, STATUS_INCORRECT_READ_OF_UNOPENED_FILE, STATUS_INCORRECT_RECORDSIZE_REWRITE, STATUS_INSERT_ERR_INAPPROPRIATE_FILE, STATUS_INSERT_ERR_INVALID_KEY, STATUS_LOCK, STATUS_NOT_FOUND, STATUS_REWRITE_WITHOUT_READ, STATUS_SM_FAIL_UNKOWN_REASON, STATUS_SM_NOT_ASSIGNED, STATUS_SUCCESS, UNCERTAIN_OF_RETURN_VALUE
-
Method Summary
Modifier and TypeMethodDescriptionint
clear()
delete all recordsint
delete()
delete the current itemvoid
delete
(int itemNumber) delete an item (this facility is for internal use only.int
provides additional information for when errors occur (in addition to the standard RESPONSE-CODE)int
insert()
Insert an item into the queueint
next()
read the next record from file.int
read()
read the first item from top of the listvoid
setItem
(int itemNumber) Write to the "Item-Number" field of the queue, and tell the system the next operation is Find and not Readvoid
setItem
(ISMNumeric itemObject) Write to the "Item-Number" field of the queue, and tell the system the next operation is Find and not Readvoid
setPrimitiveQueueType
(int newPrimitiveQueueType) sets primitiveWQueueType to one of TSQueueManager.TYPE_TEMPORARY_STORAGE (TS) or TSQueueManager.TYPE_TRANSIENT_STORAGE (TD)toString()
int
update()
Update the current record with the current record structure.void
update
(int itemNumber) Methods inherited from class com.softwaremining.vendors.cics.queue.QueueRecord
getAuxilary, getAuxilaryAsStr, getCicsQueue, getData, getDataGroup, getFieldStorageLength, getFieldSysid, getGroupCicsQueue, getGroupDataGroup, getGroupQueueKey, getItemNumber, getObjectData, getQueueKey, getQueueName, getQueueType, getStorageLength, getStorageLengthAsStr, getSysid, getSysidAsStr, initDefaultValues, initMetadata, retrieveFirstLevelEntry, setAuxilary, setAuxilary, setAuxilary, setCicsQueue, setCicsQueue, setCicsQueue, setCicsQueue, setData, setData, setData, setDataGroup, setDataGroup, setDataGroup, setDataGroup, setItemNumber, setItemNumber, setItemNumber, setItemNumber, setQueueKey, setQueueKey, setQueueKey, setQueueKey, setQueueName, setQueueType, setStorageLength, setStorageLength, setStorageLength, setSysid, setSysid, setSysid
Methods inherited from class com.softwaremining.vendors.cics.CicsPersistence
assignFileName, assignFileName, assignGenericRecordKeyLength, assignKeyValue, assignLength, assignLock, assignRecordKey, assignRecordKeyLength, assignRecordKeyValue, assignResponseCodeField, assignResponseCodeValue, assignTableName, assignTempStorage, assignTreatAsSQLWrapper, clearRecord, close, deleteRecord, getOwningCicsService, getRecordKey, getResponseCode, insertRecord, isAllowedToExpandGTEQSearches, nextRecord, prevRecord, processException, processException, processException, readRecord, releaseResources, resetCicsDelegate, restoreNonGenericKey, retrieveNativeKeys, seek, seek, seekRecord, seekRecord, seekRecord, setEibFunction, setStorageLength, updateRecord, validateConditionType
Methods inherited from class com.softwaremining.sql.SQLWrapper
_clear, _close, _commit, _deleteAllRecord, _deleteRecord, _insertRecord, _nextRecord, _open, _prevRecord, _readRecord, _readWithLock, _rollback, _seekRecord, _unlock, _updateRecord, addRecordKey, addSearchParameter, addSearchParameter, assignAdditionalKeyPosition, assignAdditionalSQLConditions, assignAdditionalSQLConditions, assignAdditionalSQLOrderBy, assignAlternateKey, assignCachedSeekValues, assignChangeGEConditonToLIKE, assignChangeGTEQ2EQForLIKECondition, assignConnection, assignDbDecorator, assignExpandGTEQSearches, assignFetchDirectionIsForward, assignFetchSize, assignFileOpened, assignGDGCondition, assignGDGProperty, assignGenerate_OrderBy_ForReadStatements, assignIgnoreOriginalKeys, assignKeyIsUnique, assignKeyValue, assignLastSeekCondition, assignLastSeekConditionLookedForEquality, assignLowerLimitForExpandGTEQSearches, assignOpenMode, assignRecordKey, assignRecordKeysAllDescending, assignRelativeKey, assignResultSet, assignResultSetFetchSize, assignRowFacade, assignSequentialKeyGeneration, assignSQLConditions, assignSQLTableName, assignSuppressSeek, assignThrowInvalidKeyException, assignTopRowSelectStrategyCount, assignTopRowSelectStrategyRange, assignUpperLimitForExpandGTEQSearches, clearSearchParameter, createAndretrieveSearchParameterInstance, isChangeGEConditonToLIKE, isChangeGTEQ2EQForLIKECondition, isFetchDirectionBackward, isFetchDirectionForward, isFileOpened, isIgnoreOriginalKeys, isKept, isKeyUnique, isLastSeekConditionLookedForEquality, isReduceGEorEQ, isSeekSuppressed, isSequentialKeyGeneration, isSuppressNextReadCurrent, readCurrent, reduceGEorEQ, releaseResources, resetRowFacade, restoreResultSet, retreiveLowerLimitForExpandGTEQSearches, retreiveUpperLimitForExpandGTEQSearches, retrieveAdditionalSearchParameters, retrieveAdditionalSQLCondition, retrieveAdditionalSQLOrderBy, retrieveAscentDescendOrder, retrieveCachedSeekValues, retrieveConnection, retrieveDbDecorator, retrieveForeignKeys, retrieveGenerate_OrderBy_ForReadStatements, retrieveImplicitDatabaseKey, retrieveLastSeekCondition, retrieveOpenMode, retrieveRecordKey, retrieveRecordKeyValue, retrieveResultSet, retrieveResultSetFetchSize, retrieveRowFacade, retrieveTableName, retrieveThrowInvalidKeyException, retrieveTopRowSelectStrategyCount, retrieveTopRowSelectStrategyStartingRow, setLock, setRelativeKey, trimCachedSeekValues, useOidTableForKeyGeneration
Methods inherited from class com.softwaremining.sql.AbstractIndexedFile
_assignKeyValue, assignAccessMode, assignDelegateDAO, assignStatus, commit, deleteAllRecord, open, prev, readWithLock, retrieveDelegateDAO, rollback, seek, seek, seekRecord, unlock
Methods inherited from class com.softwaremining.wrappers.AbstractBasePersistence
assignStatus, assignStatusAsPrimitive, assignStatusValue, assignStatusValue, readRow, retrieveAccessMode, retrieveFileName, retrieveFileName, retrieveSessionId, retrieveStatusField, retrieveStatusValue
Methods inherited from class com.softwaremining.wrappers.CBLBean
addCorrespondingValue, addCorrespondingValue, allocate, assignAddressTo, assignAddressTo, assignBean, assignBytesEncoded, assignCachedInitializationValue, assignCorrespondingValue, assignCorrespondingValue, assignDefaultValue, assignDependingField, assignEbcdicBytes, assignEbcdicJIT_PdSupportForSequentialFiles, assignEncodedValue, assignExemptFromMemRelease, assignExternal, assignHighValues, assignInternalVars, assignLowValues, assignRawEbcdicBytes, assignRecordSize, assignRedefines, assignRedefines, assignSessionId, assignStringFormatted, assignSubstring, assignSubstring, assignToAddressOf, assignToAddressOf, assignToAddressOf, assignToAddressOf, assignToAllFields, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, calculateStorageSize, containsPointers, equals, equals, equals, equals, equalsRightTrimmed, fieldsCount, fill, fill, fill, fill, fill, getValue, hasPackedDecimalFields, initialize, initialize, isExemptFromMemRelease, isFilled, isFilled, isFilled, isFilled, isGreaterThan, isGreaterThan, isGreaterThan, isHighValues, isInvolvedInDependency, isInvolvedInExternalDependency, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessThan, isLessThan, isLessThan, isLessThan, isLessThan, isLowValues, isRedefinedByAnotherClass, isResourceAlreadyReleased, lengthOf, printFieldPosition, printFieldValues, printOrderedFieldPosition, PrintOrderedFieldPositionsAndValue, resetCachedValues, resetCompressedFieldList, resetStructure, resize, retrieveActualLength, retrieveAsInt, retrieveAsString, retrieveCachedInitializationValue, retrieveCompressedFields, retrieveDependedFieldsList, retrieveEbcdicBytes, retrieveEbcdicValue, retrieveEncodedValue, retrieveField, retrieveField, retrieveFieldAtMemoryPosition, retrieveFieldFormatted, retrieveFields, retrieveIsTargetOfPointers, retrievePrimitiveFields, retrieveRawEbcdicBytes, retrieveSQLObject, retrieveStorageCellSize, retrieveStorageChars, retrieveSubstring, retrieveSubstring, retrieveTopLevelField, retrieveValue, retrieveValue, setValue, stringValue, subtractCorrespondingValue, subtractCorrespondingValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.softwaremining.vendors.cics.queue.IQueueStorage
assignResponseCodeField, getData, getObjectData, getQueueName, setData, setData, setStorageLength
Methods inherited from interface com.softwaremining.wrappers.ISMBean
assignExemptFromMemRelease, assignSessionId, assignValue, initialize, isExemptFromMemRelease, isResourceAlreadyReleased, releaseResources, resetStructure, retrieveActualLength, retrieveAsString, retrieveField, retrieveField, retrieveTopLevelField, retrieveValue, stringValue
Methods inherited from interface com.softwaremining.sql.ISQLWrapper
assignAccessMode, assignAdditionalSQLConditions, assignAdditionalSQLConditions, assignAdditionalSQLOrderBy, assignCachedSeekValues, assignChangeGEConditonToLIKE, assignChangeGTEQ2EQForLIKECondition, assignConnection, assignDbDecorator, assignDelegateDAO, assignExpandGTEQSearches, assignFetchDirectionIsForward, assignFileOpened, assignGDGCondition, assignGDGProperty, assignGenerate_OrderBy_ForReadStatements, assignIgnoreOriginalKeys, assignKeyIsUnique, assignKeyValue, assignLastSeekCondition, assignLastSeekConditionLookedForEquality, assignLowerLimitForExpandGTEQSearches, assignOpenMode, assignRecordKey, assignRecordKey, assignResultSet, assignResultSetFetchSize, assignRowFacade, assignSequentialKeyGeneration, assignSQLConditions, assignSQLTableName, assignStatus, assignStatusValue, assignSuppressSeek, assignTableName, assignThrowInvalidKeyException, assignTopRowSelectStrategyCount, assignTopRowSelectStrategyRange, assignTreatAsSQLWrapper, assignUpperLimitForExpandGTEQSearches, close, isAllowedToExpandGTEQSearches, isChangeGEConditonToLIKE, isChangeGTEQ2EQForLIKECondition, isFetchDirectionBackward, isFetchDirectionForward, isFileOpened, isIgnoreOriginalKeys, isKept, isKeyUnique, isLastSeekConditionLookedForEquality, isReduceGEorEQ, isSeekSuppressed, isSequentialKeyGeneration, isSuppressNextReadCurrent, prev, reduceGEorEQ, retreiveLowerLimitForExpandGTEQSearches, retreiveUpperLimitForExpandGTEQSearches, retrieveAccessMode, retrieveAdditionalSearchParameters, retrieveAdditionalSQLCondition, retrieveAdditionalSQLOrderBy, retrieveAscentDescendOrder, retrieveCachedSeekValues, retrieveConnection, retrieveDbDecorator, retrieveDelegateDAO, retrieveFileName, retrieveGenerate_OrderBy_ForReadStatements, retrieveImplicitDatabaseKey, retrieveLastSeekCondition, retrieveNativeKeys, retrieveOpenMode, retrieveRecordKey, retrieveRecordKeyValue, retrieveResultSet, retrieveResultSetFetchSize, retrieveRowFacade, retrieveSessionId, retrieveStatusValue, retrieveTableName, retrieveThrowInvalidKeyException, retrieveTopRowSelectStrategyCount, retrieveTopRowSelectStrategyStartingRow, seekRecord, seekRecord, setLock, unlock, useOidTableForKeyGeneration, validateConditionType
-
Field Details
-
SQL_STRING_CREATE_TABLE
- See Also:
-
-
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 interfaceIQueueStorage
- Specified by:
read
in interfaceISQLWrapper
- Overrides:
read
in classCicsPersistence
- 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 interfaceIQueueStorage
- Specified by:
next
in interfaceISQLWrapper
- Overrides:
next
in classAbstractIndexedFile
- 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 interfaceIQueueStorage
- Specified by:
insert
in interfaceISQLWrapper
- Overrides:
insert
in classCicsPersistence
-
delete
public int delete()delete the current item- Specified by:
delete
in interfaceIQueueStorage
- Specified by:
delete
in interfaceISQLWrapper
- Overrides:
delete
in classCicsPersistence
-
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 classAbstractIndexedFile
- 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 interfaceIQueueStorage
- Specified by:
update
in interfaceISQLWrapper
- Overrides:
update
in classCicsPersistence
-
update
public void update(int itemNumber) - Specified by:
update
in interfaceIQueueStorage
-
toString
-
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 interfaceIQueueStorage
-
setItem
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 interfaceIQueueStorage
-
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 interfaceIQueueStorage
- Overrides:
getResponse2Code
in classCicsPersistence
- Returns:
-