|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.queue.cache.CacheQueueInterceptorPlugin
public class CacheQueueInterceptorPlugin
Implements a queue cache. Internally it utilizes a RAM queue and a JDBC queue and manages the cache logic.
Field Summary | |
---|---|
private ContextNode |
contextNode
|
private Global |
glob
|
private boolean |
isConnected
|
(package private) boolean |
isDown
|
private static java.util.logging.Logger |
log
|
private long |
maxFetchSize
|
private java.lang.Object |
mbeanHandle
My JMX registration |
private java.lang.String |
ME
|
private boolean |
notifiedAboutAddOrRemove
|
private java.lang.Object |
peekSync
this is the sync between the peaks and the swapping: no peak should be allowed while swapping |
private I_Queue |
persistentQueue
|
private PluginInfo |
pluginInfo
object used to control the swapping performance |
private QueuePropertyBase |
property
|
private I_QueuePutListener |
putListener
|
private StorageId |
queueId
|
private StorageSizeListenerHelper |
storageSizeListenerHelper
|
private I_Queue |
transientQueue
|
Fields inherited from interface org.xmlBlaster.util.queue.I_Queue |
---|
IGNORE_PUT_INTERCEPTOR, USE_PUT_INTERCEPTOR |
Fields inherited from interface org.xmlBlaster.util.queue.I_StorageProblemListener |
---|
AVAILABLE, UNAVAILABLE, UNDEF |
Constructor Summary | |
---|---|
CacheQueueInterceptorPlugin()
|
Method Summary | |
---|---|
void |
addPutListener(I_QueuePutListener l)
Register a listener which wants to be informed on put() events. |
void |
addStorageSizeListener(I_StorageSizeListener listener)
Adds a storage size listener to the storage. |
private long |
checkEntriesAvailable(I_Queue queue,
long valueToCheckAgainst,
boolean ifFullThrowException,
java.lang.String extraTxt)
|
private long |
checkSpaceAvailable(I_Queue queue,
long valueToCheckAgainst,
boolean ifFullThrowException,
java.lang.String extraTxt)
Helper method to check the space left on a given queue. |
long |
clear()
Clears everything and removes the queue (i.e. |
private QueuePropertyBase |
createRamCopy(QueuePropertyBase queuePropertyBase)
We set the cache props to the real props for RAM queue running under a cacheQueue |
java.lang.String |
dumpEmbeddedObjects()
Currently ONLY PERSISTENT entries are dumped (TODO add transients) Currently PRIORITY is always set to 5 (see ClientEntryFactory#createEntry as ref is null and guessed |
java.lang.String |
dumpEmbeddedObjectsToFile(java.lang.String fileName)
Currently ONLY PERSISTENT entries are dumped (TODO add transients) Currently PRIORITY is always set to 5 (see ClientEntryFactory#createEntry as ref is null and guessed |
long |
embeddedObjectsToXml(java.io.OutputStream out,
java.util.Properties props)
Currently ONLY PERSISTENT entries are dumped (TODO add transients) Currently PRIORITY is always set to 5 (see ClientEntryFactory#createEntry as ref is null and guessed |
long |
embeddedQueueObjectsToXml(java.io.OutputStream out,
java.util.Properties props)
NOTE: rename from embeddedObjectsToXml to embeddedQueueObjectsToXml as it used the map lookup and lost priority info Dump all entries of this queue to the given output stream. |
java.util.List<I_Entry> |
getEntries(I_EntryFilter entryFilter)
Gets a copy of the entries (e.g the messages) in the queue. |
long[] |
getEntryReferences()
Gets the references of the entries in the queue. |
PluginInfo |
getInfo()
Enforced by I_StoragePlugin |
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()
It returns the size of the 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()
It returns the size of persistent entries in the queue. |
I_Queue |
getPersistentQueue()
returns the persistent queue (null if no one defined) |
java.lang.Object |
getProperties()
Access the current queue configuration |
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. |
StorageId |
getStorageId()
Returns the unique ID of this queue |
I_StorageSizeListener[] |
getStorageSizeListeners()
|
I_Queue |
getTransientQueue()
returns the transient queue (null if no one defined) |
java.lang.String |
getType()
Enforced by I_Plugin |
java.lang.String |
getUsageUrl()
|
java.lang.String |
getVersion()
Enforced by I_Plugin |
boolean |
hasStorageSizeListener(I_StorageSizeListener listener)
Checks wether the specified listener is registered. |
private boolean |
hasTransientsSwapped()
|
private boolean |
hasUncachedEntries()
|
void |
init(Global glob,
PluginInfo pluginInfo)
Enforced by I_Plugin |
void |
initialize(StorageId uniqueQueueId,
java.lang.Object userData)
Is called after the instance is created. |
boolean |
isNotifiedAboutAddOrRemove()
Defaults to false. |
private boolean |
isPersistenceAvailable()
|
boolean |
isShutdown()
Check status |
boolean |
isTransient()
|
private int |
loadFromPersistence()
Loads from the persistence so much data as it fits into the transient queue. |
I_QueueEntry |
peek()
Returns the first element in the queue but does not remove it from that queue (leaves it untouched). |
java.util.List<I_Entry> |
peek(int numOfEntries,
long numOfBytes)
Returns maximum the first num element in the queue but does not remove it from that queue (leaves it untouched). |
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.util.List<I_Entry> |
peekLowest(int numOfEntries,
long numOfBytes,
I_QueueEntry limitEntry,
boolean leaveOne)
Aware: peekLowest is not implemented!! |
java.util.List<I_Entry> |
peekSamePriority(int numOfEntries,
long numOfBytes)
Returns maximum the first num element in the queue of highest priority but does not remove it from that queue (leaves it untouched). |
java.util.List<I_Entry> |
peekStartAt(int numOfEntries,
long numOfBytes,
I_QueueEntry firstEntryExlusive)
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). |
java.util.List<I_Entry> |
peekWithLimitEntry(I_QueueEntry limitEntry)
Deprecated. |
java.util.List<I_Entry> |
peekWithPriority(int numOfEntries,
long numOfBytes,
int minPriority,
int maxPriority)
Returns maximum given number of entries from the queue (none blocking). |
void |
put(I_QueueEntry[] queueEntries,
boolean ignorePutInterceptor)
All entries are stored into the transient queue. |
void |
put(I_QueueEntry queueEntry,
boolean ignorePutInterceptor)
Puts one queue entry on top of the queue. |
boolean |
registerStorageProblemListener(I_StorageProblemListener listener)
registers a new listener to be notified. |
int |
remove()
Removes the first element in the queue This method does not block. |
long |
removeHead(I_QueueEntry toEntry)
removes the head of the queue until (but not included) the entry specified as the argument. |
long |
removeNum(long numOfEntries)
Removes max num messages. |
private boolean[] |
removePossibleSwappedEntries(boolean[] ret,
I_Entry[] queueEntries)
The given ret array will be updated with the result of the removing from the persistent queue. |
void |
removePutListener(I_QueuePutListener l)
Remove the listener which wanted to be informed on put() events. |
int |
removeRandom(I_Entry entry)
Removes the given entry. |
boolean[] |
removeRandom(I_Entry[] queueEntries)
Removes the given entries. |
int |
removeRandom(long dataId)
Removes the given entry. |
long |
removeRandom(long[] dataIdArray)
Removes the given entries. |
private boolean[] |
removeRandomNoNotify(I_Entry[] queueEntries)
|
void |
removeStorageSizeListener(I_StorageSizeListener listener)
Removes the specified listener from the queue. |
int |
removeTransient()
Removes all the transient entries (the ones which have the flag 'persistent' set to false. |
long |
removeWithLimitEntry(I_QueueEntry limitEntry,
boolean inclusive)
It removes the entries which are higher than the entry specified in the argument list. |
long |
removeWithPriority(long numOfEntries,
long numOfBytes,
int minPriority,
int maxPriority)
Removes max numOfEntries messages (or less depending on the numOfBytes). |
void |
setNotifiedAboutAddOrRemove(boolean notify)
|
void |
setProperties(java.lang.Object userData)
Allows to overwrite properties which where passed on initialize() The properties which support hot configuration are depending on the used implementation |
void |
setUsageUrl(java.lang.String url)
|
void |
shutdown()
Shutdown the implementation, sync with data store |
void |
storageAvailable(int oldStatus)
Invoked by the I_StorageProblemNotifier when the storage becomes available again (for example on a DB when the jdbc connection is broken). |
void |
storageUnavailable(int oldStatus)
Invoked by the I_StorageProblemNotifier when the storage becomes unavailable (for example on a DB when the jdbc connection is broken). |
java.util.List<I_Entry> |
takeLowest(int numOfEntries,
long numOfBytes,
I_QueueEntry limitEntry,
boolean leaveOne)
Aware: takeLowest for more than one entry is not implemented!! |
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. |
java.lang.String |
toXml(java.lang.String extraOffset)
Dump state to XML string. |
boolean |
unRegisterStorageProblemListener(I_StorageProblemListener listener)
unregisters a listener. |
int |
update(I_QueueEntry queueEntry)
Updates the given message queue entry with a new value. |
java.lang.String |
usage()
JMX help |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.logging.Logger log
private java.lang.String ME
private ContextNode contextNode
private QueuePropertyBase property
private boolean notifiedAboutAddOrRemove
boolean isDown
private StorageId queueId
private I_QueuePutListener putListener
private I_Queue transientQueue
private I_Queue persistentQueue
private Global glob
private boolean isConnected
private PluginInfo pluginInfo
private java.lang.Object peekSync
private java.lang.Object mbeanHandle
private long maxFetchSize
private StorageSizeListenerHelper storageSizeListenerHelper
Constructor Detail |
---|
public CacheQueueInterceptorPlugin()
Method Detail |
---|
public boolean isTransient()
isTransient
in interface I_AdminQueue
isTransient
in interface I_Storage
private final long checkSpaceAvailable(I_Queue queue, long valueToCheckAgainst, boolean ifFullThrowException, java.lang.String extraTxt) throws XmlBlasterException
queue
- the queue on which to calculate the space left.valueToCheckAgainst
- the amount of bytes which are subtracted (needed in the queue) in this
check.ifFullThrowException
- if 'true' this method will throw an exception if the return value would
be negative
XmlBlasterException
- if the 'ifFullThrowException' flag has been set to 'true' and the
return value would be negative.private final long checkEntriesAvailable(I_Queue queue, long valueToCheckAgainst, boolean ifFullThrowException, java.lang.String extraTxt) throws XmlBlasterException
XmlBlasterException
public void storageUnavailable(int oldStatus)
I_StorageProblemListener
storageUnavailable
in interface I_StorageProblemListener
oldStatus
- the status before the storage became unavailable.I_StorageProblemListener.storageUnavailable(int)
public void storageAvailable(int oldStatus)
I_StorageProblemListener
storageAvailable
in interface I_StorageProblemListener
I_StorageProblemListener.storageAvailable(int)
public void initialize(StorageId uniqueQueueId, java.lang.Object userData) throws XmlBlasterException
initialize
in interface I_Queue
uniqueQueueId
- A unique name, allowing to create a unique name for a persistent store (e.g. file name)userData
- For example a Properties object or a String[] args object passing the configuration data
XmlBlasterException
I_Queue.initialize(StorageId, Object)
private QueuePropertyBase createRamCopy(QueuePropertyBase queuePropertyBase)
public void setProperties(java.lang.Object userData) throws XmlBlasterException
I_Queue
setProperties
in interface I_Queue
XmlBlasterException
I_Queue.setProperties(Object)
public java.lang.String getPropertyStr()
I_AdminQueue
getPropertyStr
in interface I_AdminQueue
public java.lang.Object getProperties()
getProperties
in interface I_Queue
public void setNotifiedAboutAddOrRemove(boolean notify)
setNotifiedAboutAddOrRemove
in interface I_Queue
public boolean isNotifiedAboutAddOrRemove()
I_AdminQueue
isNotifiedAboutAddOrRemove
in interface I_AdminQueue
isNotifiedAboutAddOrRemove
in interface I_Queue
public void addPutListener(I_QueuePutListener l)
I_Queue
addPutListener
in interface I_Queue
I_Queue.addPutListener(I_QueuePutListener)
public void removePutListener(I_QueuePutListener l)
I_Queue
removePutListener
in interface I_Queue
I_Queue.removePutListener(I_QueuePutListener)
public I_Queue getPersistentQueue()
public I_Queue getTransientQueue()
public long[] getEntryReferences() throws XmlBlasterException
getEntryReferences
in interface I_AdminQueue
getEntryReferences
in interface I_Queue
XmlBlasterException
public java.util.List<I_Entry> getEntries(I_EntryFilter entryFilter) throws XmlBlasterException
I_Queue
getEntries
in interface I_Queue
entryFilter
- if not null the you can control which entries to return
with the callback entryFilter.intercept(I_Entry).
XmlBlasterException
I_Queue.getEntries(I_EntryFilter)
public void put(I_QueueEntry queueEntry, boolean ignorePutInterceptor) throws XmlBlasterException
I_Queue
put
in interface I_Queue
ignorePutInterceptor
- if set to 'IGNORE_PUT_INTERCEPTOR=true' the put will not inform the
QueuePutListener that a put occurred.
XmlBlasterException
- in case an error occurs. Possible causes of
error can be a communication exception of the underlying implementation (jdbc, file system etc).I_Queue.put(I_QueueEntry, boolean)
public void put(I_QueueEntry[] queueEntries, boolean ignorePutInterceptor) throws XmlBlasterException
put
in interface I_Queue
ignorePutInterceptor
- if set to 'IGNORE_PUT_INTERCEPTOR=true' the put will not inform the
QueuePutListener that a put occurred.
XmlBlasterException
- in case an error occurs. Possible causes of
error can be a communication exception of the underlying implementation (jdbc, file system etc).I_Queue.put(I_QueueEntry[], boolean)
public java.lang.String getQueueName()
I_AdminQueue
getQueueName
in interface I_AdminQueue
public StorageId getStorageId()
getStorageId
in interface I_Storage
public java.util.List<I_Entry> takeWithPriority(int numOfEntries, long numOfBytes, int minPriority, int maxPriority) throws XmlBlasterException
I_AdminQueue
takeWithPriority
in interface I_AdminQueue
takeWithPriority
in interface I_Queue
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.I_Queue.takeWithPriority(int,long,int,int)
private final boolean hasTransientsSwapped()
private final boolean isPersistenceAvailable()
private final boolean hasUncachedEntries()
public java.util.List<I_Entry> peekLowest(int numOfEntries, long numOfBytes, I_QueueEntry limitEntry, boolean leaveOne) throws XmlBlasterException
peekLowest
in interface I_Queue
XmlBlasterException
I_Queue.peekLowest(int, long, I_QueueEntry, boolean)
public java.util.List<I_Entry> takeLowest(int numOfEntries, long numOfBytes, I_QueueEntry limitEntry, boolean leaveOne) throws XmlBlasterException
takeLowest
in interface I_Queue
numOfEntries
- inclusive, zero up to numOfEntries, if -1 up to the whole queuenumOfBytes
- inclusive, and minimum one is returned (but not if limitEntry suppress it)leaveOne
- Usually set to false. (true for cache queue to never flush transient queue totally)
XmlBlasterException
I_Queue.takeLowest(int, long, I_QueueEntry, boolean)
public java.lang.String peekStr() throws java.lang.Exception
I_AdminQueue
peekStr
in interface I_AdminQueue
java.lang.Exception
- if the underlying implementation gets an exception.public java.lang.String[] peekEntries(int numOfEntries) throws java.lang.Exception
I_AdminQueue
peekEntries
in interface I_AdminQueue
numOfEntries
- Access num entries, if -1 access all entries currently found
java.lang.Exception
- if the underlying implementation gets an exception.public I_QueueEntry peek() throws XmlBlasterException
I_Queue
peek
in interface I_Queue
XmlBlasterException
- if the underlying implementation gets an exception.I_Queue.peek()
public java.util.List<I_Entry> peek(int numOfEntries, long numOfBytes) throws XmlBlasterException
I_Queue
peek
in interface I_Queue
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
- if the underlying implementation gets an exception.I_Queue.peek(int,long)
public java.util.List<I_Entry> peekStartAt(int numOfEntries, long numOfBytes, I_QueueEntry firstEntryExlusive) throws XmlBlasterException
I_Queue
peekStartAt
in interface I_Queue
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
- if the underlying implementation gets an exception.public java.util.List<I_Entry> peekSamePriority(int numOfEntries, long numOfBytes) throws XmlBlasterException
I_Queue
peekSamePriority
in interface I_Queue
numOfEntries
- Access num entries, if -1 access 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. -1 is unlimited.
XmlBlasterException
- if the underlying implementation gets an exception.I_Queue.peekSamePriority(int, long)
public java.util.List<I_Entry> peekWithPriority(int numOfEntries, long numOfBytes, int minPriority, int maxPriority) throws XmlBlasterException
I_Queue
peekWithPriority
in interface I_Queue
numOfEntries
- Access num 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 highest, <0 is not allowedmaxPriority
- The higher priority (inclusive), usually 0 lowest, 9 highest, <0 is not allowed
XmlBlasterException
- in case the underlying implementation gets an exception while retrieving the element.I_Queue.peekWithPriority(int, long, int, int)
public java.util.List<I_Entry> peekWithLimitEntry(I_QueueEntry limitEntry) throws XmlBlasterException
I_Queue
peekWithLimitEntry
in interface I_Queue
limitEntry
- the entry which limits the peek. Only entries of higher order, i.e.
entries having a higher priority, or same priority and lower uniqueId are
returned. If entryLimit is null or no entries are higher than entryLimit,
an empty list is returned.
Note: The limitEntry does not need to be in the queue.
XmlBlasterException
I_Queue.peekWithLimitEntry(I_QueueEntry)
public long removeWithLimitEntry(I_QueueEntry limitEntry, boolean inclusive) throws XmlBlasterException
I_Queue
removeWithLimitEntry
in interface I_Queue
limitEntry
- the entry which limits the remove. Only entries of higher order, i.e.
entries having a higher priority, or same priority and lower uniqueId are
deleted. If entryLimit is null or no entries are higher than entryLimit,
an empty list is returned.inclusive
- if 'true', then also the entry specified will be removed (if it exists). If false
the remove is exclusive, i.e. the specified entry is left in the queue.
Note: The limitEntry does not need to be in the queue.
XmlBlasterException
I_Queue.removeWithLimitEntry(I_QueueEntry, boolean)
public int remove() throws XmlBlasterException
remove
in interface I_AdminQueue
remove
in interface I_Queue
XmlBlasterException
- if the underlying implementation gets an exception.public long removeNum(long numOfEntries) throws XmlBlasterException
removeNum
in interface I_AdminQueue
removeNum
in interface I_Queue
num
- Erase num entries or less if less entries are available, -1 erases everything
XmlBlasterException
- if the underlying implementation gets an exception.public int removeRandom(long dataId) throws XmlBlasterException
dataId
- the unique id. It must be unique within the storage area
of the implementing queue. In other words, if the underlying
implementation is on RAM, then the storage area is the JVM, that
is the queue must be unique in the same JVM. If the queue is a
jdbc, the dataId is unique in the DB used.
XmlBlasterException
public long removeRandom(long[] dataIdArray) throws XmlBlasterException
msgQueueEntry
- the entry to erase.
XmlBlasterException
public int removeRandom(I_Entry entry) throws XmlBlasterException
I_Queue
removeRandom
in interface I_Queue
entry
- The entry to erase.
XmlBlasterException
I_Queue.removeRandom(I_Entry)
private final boolean[] removePossibleSwappedEntries(boolean[] ret, I_Entry[] queueEntries)
private final boolean[] removeRandomNoNotify(I_Entry[] queueEntries) throws XmlBlasterException
XmlBlasterException
I_Queue.removeRandom(I_Entry[])
public final boolean[] removeRandom(I_Entry[] queueEntries) throws XmlBlasterException
I_Queue
removeRandom
in interface I_Queue
queueEntries
- the entries to erase.
XmlBlasterException
I_Queue.removeRandom(I_Entry[])
private final int loadFromPersistence() throws XmlBlasterException
XmlBlasterException
public long removeWithPriority(long numOfEntries, long numOfBytes, int minPriority, int maxPriority) throws XmlBlasterException
I_AdminQueue
removeWithPriority
in interface I_AdminQueue
removeWithPriority
in interface I_Queue
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.I_Queue.removeWithPriority(long, long, int, int)
public int removeTransient() throws XmlBlasterException
I_AdminQueue
removeTransient
in interface I_AdminQueue
XmlBlasterException
I_Queue#removeTransient()
public long getNumOfEntries()
getNumOfEntries
in interface I_AdminQueue
getNumOfEntries
in interface I_Storage
I_Storage.getNumOfEntries()
public long getNumOfPersistentEntries()
getNumOfPersistentEntries
in interface I_AdminQueue
getNumOfPersistentEntries
in interface I_Queue
I_Queue.getNumOfPersistentEntries()
public long getMaxNumOfEntries()
I_AdminQueue
getMaxNumOfEntries
in interface I_AdminQueue
getMaxNumOfEntries
in interface I_Storage
I_Storage.getMaxNumOfEntries()
public long getNumOfBytes()
I_AdminQueue
getNumOfBytes
in interface I_AdminQueue
getNumOfBytes
in interface I_Storage
I_Storage.getNumOfBytes()
public long getNumOfPersistentBytes()
I_AdminQueue
getNumOfPersistentBytes
in interface I_AdminQueue
getNumOfPersistentBytes
in interface I_Queue
I_Queue.getNumOfPersistentBytes()
public long getMaxNumOfBytes()
I_AdminQueue
getMaxNumOfBytes
in interface I_AdminQueue
getMaxNumOfBytes
in interface I_Queue
I_Queue.getMaxNumOfBytes()
public int update(I_QueueEntry queueEntry) throws XmlBlasterException
XmlBlasterException
public long clear()
clear
in interface I_AdminQueue
clear
in interface I_Queue
public long removeHead(I_QueueEntry toEntry) throws XmlBlasterException
I_Queue
removeHead
in interface I_Queue
toEntry
- the entry until to remove.
XmlBlasterException
I_Queue.removeHead(I_QueueEntry)
public void shutdown()
shutdown
in interface I_AdminPlugin
shutdown
in interface I_AdminQueue
shutdown
in interface I_Plugin
shutdown
in interface I_Queue
public boolean isShutdown()
I_AdminPlugin
isShutdown
in interface I_AdminPlugin
isShutdown
in interface I_AdminQueue
isShutdown
in interface I_Storage
public java.lang.String usage()
usage
in interface I_AdminUsage
usage
in interface I_Queue
public java.lang.String getUsageUrl()
getUsageUrl
in interface I_AdminUsage
public void setUsageUrl(java.lang.String url)
setUsageUrl
in interface I_AdminUsage
public final java.lang.String toXml()
I_AdminQueue
toXml
in interface I_AdminQueue
public final java.lang.String toXml(java.lang.String extraOffset)
I_Queue
toXml
in interface I_Queue
extraOffset
- Indent the dump with given ASCII blanks
public void init(Global glob, PluginInfo pluginInfo)
init
in interface I_Plugin
I_Plugin.init(org.xmlBlaster.util.Global, PluginInfo)
public java.lang.String getType()
getType
in interface I_AdminPlugin
getType
in interface I_Plugin
public java.lang.String getVersion()
getVersion
in interface I_AdminPlugin
getVersion
in interface I_Plugin
public PluginInfo getInfo()
getInfo
in interface I_StoragePlugin
public boolean registerStorageProblemListener(I_StorageProblemListener listener)
I_StorageProblemNotifier
registerStorageProblemListener
in interface I_StorageProblemNotifier
I_StorageProblemNotifier.registerStorageProblemListener(I_StorageProblemListener)
public boolean unRegisterStorageProblemListener(I_StorageProblemListener listener)
I_StorageProblemNotifier
unRegisterStorageProblemListener
in interface I_StorageProblemNotifier
I_StorageProblemNotifier.unRegisterStorageProblemListener(I_StorageProblemListener)
public void addStorageSizeListener(I_StorageSizeListener listener)
I_Storage
addStorageSizeListener
in interface I_Storage
listener
- the listener to be added, adding the same listener multiple times will only remember one and fire onceI_Storage.addStorageSizeListener(I_StorageSizeListener)
public void removeStorageSizeListener(I_StorageSizeListener listener)
I_Storage
removeStorageSizeListener
in interface I_Storage
listener
- the listener to be removed. Currently only one.
If you pass null, all queueSizeListeners are removed.I_Storage.removeStorageSizeListener(I_StorageSizeListener)
public boolean hasStorageSizeListener(I_StorageSizeListener listener)
I_Storage
hasStorageSizeListener
in interface I_Storage
listener
- the listener to check against. If you pass null
it checks if at least one listener exists.
I_Storage.hasStorageSizeListener(I_StorageSizeListener)
public I_StorageSizeListener[] getStorageSizeListeners()
getStorageSizeListeners
in interface I_Storage
I_Storage.getStorageSizeListeners()
public long embeddedQueueObjectsToXml(java.io.OutputStream out, java.util.Properties props) throws java.lang.Exception
I_Queue
embeddedQueueObjectsToXml
in interface I_Queue
out
- The output stream to dump the entriesprops
- Configuration properties, not yet specified, just pass null
java.lang.Exception
public long embeddedObjectsToXml(java.io.OutputStream out, java.util.Properties props) throws java.lang.Exception
ClientEntryFactory#createEntry
as ref is null and guessed
java.lang.Exception
I_Queue#embeddedObjectsToXml(OutputStream, Properties)
public java.lang.String dumpEmbeddedObjectsToFile(java.lang.String fileName) throws java.lang.Exception
ClientEntryFactory#createEntry
as ref is null and guessed
dumpEmbeddedObjectsToFile
in interface I_AdminQueue
fileName
- The file name to dump, may contain a path.
java.lang.Exception
I_AdminQueue.dumpEmbeddedObjectsToFile(String)
public java.lang.String dumpEmbeddedObjects()
ClientEntryFactory#createEntry
as ref is null and guessed
dumpEmbeddedObjects
in interface I_AdminQueue
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |