|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface I_AdminQueue
Declares available methods of a queue implementation for administration.
SNMP or telnet tools can access only the here declared properties.
I_Queue
Method Summary | |
---|---|
long |
clear()
Remove all queue entries. |
java.lang.String |
dumpEmbeddedObjects()
Dump all entries of this queue, for JMX The messages are XML formatted. |
java.lang.String |
dumpEmbeddedObjectsToFile(java.lang.String fileName)
Dump all entries of this queue to a file. |
long[] |
getEntryReferences()
Gets the references of the entries in the queue. |
long |
getMaxNumOfBytes()
Access the configured capacity (maximum bytes) for this queue |
long |
getMaxNumOfEntries()
Returns the maximum number of elements for this queue |
long |
getNumOfBytes()
Returns the amount of bytes currently in the queue. |
long |
getNumOfEntries()
Returns the number of elements in this queue. |
long |
getNumOfPersistentBytes()
Returns the amount of bytes used by the persistent entries in the queue If the implementation of this interface is not able to return the correct number of entries (for example if the implementation must make a remote call to a DB which is temporarly not available) it will return -1. |
long |
getNumOfPersistentEntries()
Returns the number of elements having the persistent flag set in this queue. |
java.lang.String |
getPropertyStr()
Access the current queue configuration |
java.lang.String |
getQueueName()
Returns the unique ID of this queue as found in the database XB_ENTRIES.queueName column. |
boolean |
isNotifiedAboutAddOrRemove()
Defaults to false. |
boolean |
isShutdown()
Check status of queue. |
boolean |
isTransient()
|
java.lang.String[] |
peekEntries(int numOfEntries)
Returns maximum the first num element in the queue but does not remove it from that queue (leaves it untouched). |
java.lang.String |
peekStr()
Returns the first element in the queue but does not remove it from that queue (leaves it untouched). |
int |
remove()
Removes the first element in the queue. |
long |
removeNum(long numOfEntries)
Removes max num messages. |
int |
removeTransient()
Removes all the transient entries (the ones which have the flag 'persistent' set to false. |
long |
removeWithPriority(long numOfEntries,
long numOfBytes,
int minPriority,
int maxPriority)
Removes max numOfEntries messages (or less depending on the numOfBytes). |
void |
shutdown()
Shutdown the implementation, sync with data store, free resources. |
java.util.List<I_Entry> |
takeWithPriority(int numOfEntries,
long numOfBytes,
int minPriority,
int maxPriority)
Takes given number of entries out of the queue. |
java.lang.String |
toXml()
Dump state to XML string. |
Methods inherited from interface org.xmlBlaster.util.admin.I_AdminPlugin |
---|
getType, getVersion |
Methods inherited from interface org.xmlBlaster.util.admin.I_AdminUsage |
---|
getUsageUrl, setUsageUrl, usage |
Method Detail |
---|
java.lang.String getPropertyStr()
boolean isNotifiedAboutAddOrRemove()
long[] getEntryReferences() throws XmlBlasterException
XmlBlasterException
java.lang.String getQueueName()
java.util.List<I_Entry> takeWithPriority(int numOfEntries, long numOfBytes, int minPriority, int maxPriority) throws XmlBlasterException
numOfEntries
- Take numOfEntries entries, if -1 take all entries currently foundnumOfBytes
- so many entries are returned as not to exceed the amount specified. If the first
entry is bigger than this amount, it is returned anyway.minPriority
- The lower priority (inclusive), usually 0 lowest, 9 highestmaxPriority
- The higher priority (inclusive), usually 0 lowest, 9 highest
XmlBlasterException
- in case the underlying implementation gets an exception while retrieving the element.java.lang.String peekStr() throws java.lang.Exception
java.lang.Exception
- if the underlying implementation gets an exception.java.lang.String[] peekEntries(int numOfEntries) throws java.lang.Exception
numOfEntries
- Access num entries, if -1 access all entries currently found
java.lang.Exception
- if the underlying implementation gets an exception.int remove() throws XmlBlasterException
XmlBlasterException
- if the underlying implementation gets an exception.long removeNum(long numOfEntries) throws XmlBlasterException
numOfEntries
- Erase num entries or less if less entries are available, -1 erases everythingnumOfBytes
- so many entries are returned as not to exceed the amount specified. If the first
entry is bigger than this amount, it is removed anyway.
XmlBlasterException
- if the underlying implementation gets an exception.long removeWithPriority(long numOfEntries, long numOfBytes, int minPriority, int maxPriority) throws XmlBlasterException
numOfEntries
- Erase num entries or less if less entries are available, -1 erases everythingnumOfBytes
- so many entries are returned as not to exceed the amout specified. If the first
entry is bigger than this amount, it is returned anyway.minPriority
- The lower priority (inclusive), usually 0 lowest, 9 highestmaxPriority
- The higher priority (inclusive), usually 0 lowest, 9 highest
XmlBlasterException
- in case the underlying implementation gets an exception while retrieving the element.long getNumOfEntries()
long getNumOfPersistentEntries()
long getMaxNumOfEntries()
long getNumOfBytes()
long getNumOfPersistentBytes()
long getMaxNumOfBytes()
int removeTransient() throws XmlBlasterException
XmlBlasterException
boolean isTransient()
long clear()
void shutdown()
shutdown
in interface I_AdminPlugin
boolean isShutdown()
isShutdown
in interface I_AdminPlugin
java.lang.String toXml()
extraOffset
- Indent the dump with given ASCII blanks
java.lang.String dumpEmbeddedObjectsToFile(java.lang.String fileName) throws java.lang.Exception
fileName
- The file name to dump, may contain a path.
java.lang.Exception
java.lang.String dumpEmbeddedObjects()
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |