|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.queue.jdbc.XBFactoryBase org.xmlBlaster.util.queue.jdbc.XBDatabaseAccessor org.xmlBlaster.util.queue.jdbc.XBDatabaseAccessorDelegate
public final class XBDatabaseAccessorDelegate
Field Summary |
---|
Fields inherited from class org.xmlBlaster.util.queue.jdbc.XBFactoryBase |
---|
DB2, FIREBIRD, HSQLDB, LDBC, MYSQL, ORACLE, POSTGRES, SQLITE, SQLSERVER_2000, SQLSERVER_2005, UNKNOWN |
Fields inherited from interface org.xmlBlaster.util.queue.I_StorageProblemListener |
---|
AVAILABLE, UNAVAILABLE, UNDEF |
Constructor Summary | |
---|---|
XBDatabaseAccessorDelegate()
|
Method Summary | |
---|---|
int[] |
addEntries(XBStore store,
I_Entry[] entries)
Adds several rows to the specified queue table in batch mode to improve performance |
boolean |
addEntry(XBStore store,
I_Entry entry)
Adds a row to the specified queue table |
int |
cleanUp(XBStore store)
Cleans up the specified queue. |
long |
clearQueue(XBStore store)
|
long |
deleteAllTransient(XBStore store)
deletes all transient messages |
int |
deleteEntries(XBStore store,
long refId,
long meatId)
|
long |
deleteEntries(XBStore store,
XBRef[] refs,
XBMeat[] meats)
Deletes the entries specified by the entries array. |
long |
deleteFirstRefs(XBStore store,
long numOfEntries)
Deletes number of entries specified by the argument list. |
void |
deleteStore(long storeId)
Deletes the store. |
protected void |
doInit(org.xmlBlaster.contrib.I_Info info)
|
ReturnDataHolder |
getAndDeleteLowest(XBStore store,
int numOfEntries,
long numOfBytes,
int maxPriority,
long minUniqueId,
boolean leaveOne,
boolean doDelete,
I_Storage storage)
Under the same transaction it gets and deletes all the entries which fit into the constrains specified in the argument list. |
java.util.List<I_Entry> |
getEntries(XBStore store,
int numOfEntries,
long numOfBytes,
I_EntryFilter entryFilter,
boolean isRef,
I_Storage storage)
gets the first numOfEntries of the queue. |
java.util.List<I_Entry> |
getEntries(XBStore store,
XBRef[] refs,
XBMeat[] meats)
gets all the entries which have the dataid specified in the argument list. |
java.util.List<I_Entry> |
getEntriesByPriority(XBStore store,
int numOfEntries,
long numOfBytes,
int minPrio,
int maxPrio)
gets the first numOfEntries of the queue which have the priority in the range specified by prioMin and prioMax (inclusive). |
java.util.List<I_Entry> |
getEntriesBySamePriority(XBStore store,
int numOfEntries,
long numOfBytes)
gets the first numOfEntries of the queue which have the same priority. |
XBEntry[] |
getEntriesLike(java.lang.String queueNamePattern,
java.lang.String flag,
int numOfEntries,
long numOfBytes,
I_EntryFilter entryFilter)
Raw access to the table. |
java.util.List<I_Entry> |
getEntriesWithLimit(XBStore store,
I_Entry limitEntry,
I_Storage storage)
gets the first numOfEntries of the queue until the limitEntry is reached. |
EntryCount |
getNumOfAll(XBStore store)
Gets the real number of entries. |
java.util.List<I_Entry> |
getRefEntries(XBStore store,
int numOfEntries,
long numOfBytes,
I_EntryFilter entryFilter,
I_Storage storage,
I_QueueEntry firstEntryExlusive)
|
long |
modifyEntry(XBStore store,
XBMeat entry,
XBMeat oldEntry,
boolean onlyRefCounters)
modifies a row in the specified queue table |
long |
removeEntriesWithLimit(XBStore store,
XBRef limitEntry,
boolean inclusive)
deletes the first numOfEntries of the queue until the limitEntry is reached. |
int |
wipeOutDB(boolean doSetupNewTables)
Wipes out the entire DB. |
Methods inherited from class org.xmlBlaster.util.queue.jdbc.XBDatabaseAccessor |
---|
checkIfDBLoss, checkIfDBLoss, createInstance, deleteEntry, dumpMetaData, getAllOfType, getIsolationLevel, getPool, getStorageProblemListenerArr, getXBStore, getXBStoreFactory, init, initFactory, isolationToString, ping, registerQueue, registerStorageProblemListener, setUp, shutdown, storageAvailable, storageUnavailable, unregisterQueue, unRegisterStorageProblemListener, wipeOutDB |
Methods inherited from class org.xmlBlaster.util.queue.jdbc.XBFactoryBase |
---|
getDbVendor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XBDatabaseAccessorDelegate()
Method Detail |
---|
protected void doInit(org.xmlBlaster.contrib.I_Info info) throws XmlBlasterException
doInit
in class XBDatabaseAccessor
XmlBlasterException
public long modifyEntry(XBStore store, XBMeat entry, XBMeat oldEntry, boolean onlyRefCounters) throws XmlBlasterException
XBDatabaseAccessor
modifyEntry
in class XBDatabaseAccessor
entry
- the object to be stored.oldEntry
- the old one
XmlBlasterException
- if an error occurred when trying to get a connection or an SQLException
occurred.public boolean addEntry(XBStore store, I_Entry entry) throws XmlBlasterException
XBDatabaseAccessor
addEntry
in class XBDatabaseAccessor
entry
- the object to be stored.
XmlBlasterException
- if an error occured when trying to get a connectionpublic int[] addEntries(XBStore store, I_Entry[] entries) throws XmlBlasterException
XBDatabaseAccessor
addEntries
in class XBDatabaseAccessor
entries
- the entries to store
XmlBlasterException
- if an error occured when trying to get a connectionpublic int cleanUp(XBStore store) throws XmlBlasterException
XBDatabaseAccessor
cleanUp
in class XBDatabaseAccessor
XmlBlasterException
public int wipeOutDB(boolean doSetupNewTables) throws XmlBlasterException
XBDatabaseAccessor
wipeOutDB
in class XBDatabaseAccessor
doSetupNewTables
- if set to 'true' it recreates the necessary empty tables.
XmlBlasterException
public long deleteAllTransient(XBStore store) throws XmlBlasterException
XBDatabaseAccessor
deleteAllTransient
in class XBDatabaseAccessor
XmlBlasterException
public ReturnDataHolder getAndDeleteLowest(XBStore store, int numOfEntries, long numOfBytes, int maxPriority, long minUniqueId, boolean leaveOne, boolean doDelete, I_Storage storage) throws XmlBlasterException
XBDatabaseAccessor
getAndDeleteLowest
in class XBDatabaseAccessor
XmlBlasterException
I_Queue.takeLowest(int, long, org.xmlBlaster.util.queue.I_QueueEntry, boolean)
public void deleteStore(long storeId) throws XmlBlasterException
XBDatabaseAccessor
deleteStore
in class XBDatabaseAccessor
XmlBlasterException
public long deleteEntries(XBStore store, XBRef[] refs, XBMeat[] meats) throws XmlBlasterException
XBDatabaseAccessor
deleteEntries
in class XBDatabaseAccessor
refs
- the array containing all entries to delete for the refs.meats
- the array containing all entries to delete for the meats.
XmlBlasterException
public int deleteEntries(XBStore store, long refId, long meatId) throws XmlBlasterException
XmlBlasterException
public long deleteFirstRefs(XBStore store, long numOfEntries) throws XmlBlasterException
XBDatabaseAccessor
deleteFirstRefs
in class XBDatabaseAccessor
numOfEntries
- the number of entries to be deleted.
XmlBlasterException
public java.util.List<I_Entry> getEntriesByPriority(XBStore store, int numOfEntries, long numOfBytes, int minPrio, int maxPrio) throws XmlBlasterException
XBDatabaseAccessor
getEntriesByPriority
in class XBDatabaseAccessor
numOfEntries
- the maximum number of elements to retrieve. If negative there is no constriction.numOfBytes
- the maximum number of bytes to retrieve. If negative, there is no constriction.minPrio
- the minimum priority to retreive (inclusive).maxPrio
- the maximum priority to retrieve (inclusive).
XmlBlasterException
public java.util.List<I_Entry> getEntriesBySamePriority(XBStore store, int numOfEntries, long numOfBytes) throws XmlBlasterException
XBDatabaseAccessor
getEntriesBySamePriority
in class XBDatabaseAccessor
numOfEntries
- the maximum number of elements to retrieve
XmlBlasterException
public java.util.List<I_Entry> getRefEntries(XBStore store, int numOfEntries, long numOfBytes, I_EntryFilter entryFilter, I_Storage storage, I_QueueEntry firstEntryExlusive) throws XmlBlasterException
getRefEntries
in class XBDatabaseAccessor
XmlBlasterException
public java.util.List<I_Entry> getEntries(XBStore store, int numOfEntries, long numOfBytes, I_EntryFilter entryFilter, boolean isRef, I_Storage storage) throws XmlBlasterException
XBDatabaseAccessor
Is public for testsuite only.
getEntries
in class XBDatabaseAccessor
numOfEntries
- Access num entries, if -1 access all entries currently foundnumOfBytes
- is the maximum size in bytes of the array to return, -1 is unlimited .
XmlBlasterException
public XBEntry[] getEntriesLike(java.lang.String queueNamePattern, java.lang.String flag, int numOfEntries, long numOfBytes, I_EntryFilter entryFilter) throws XmlBlasterException
XBDatabaseAccessor
getEntriesLike
in class XBDatabaseAccessor
numOfEntries
- the maximum number of elements to retrieve
XmlBlasterException
public java.util.List<I_Entry> getEntriesWithLimit(XBStore store, I_Entry limitEntry, I_Storage storage) throws XmlBlasterException
XBDatabaseAccessor
getEntriesWithLimit
in class XBDatabaseAccessor
XmlBlasterException
public long removeEntriesWithLimit(XBStore store, XBRef limitEntry, boolean inclusive) throws XmlBlasterException
XBDatabaseAccessor
removeEntriesWithLimit
in class XBDatabaseAccessor
XmlBlasterException
public java.util.List<I_Entry> getEntries(XBStore store, XBRef[] refs, XBMeat[] meats) throws XmlBlasterException
XBDatabaseAccessor
getEntries
in class XBDatabaseAccessor
XmlBlasterException
public EntryCount getNumOfAll(XBStore store) throws XmlBlasterException
XBDatabaseAccessor
getNumOfAll
in class XBDatabaseAccessor
XmlBlasterException
public long clearQueue(XBStore store) throws XmlBlasterException
clearQueue
in class XBDatabaseAccessor
XmlBlasterException
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |