|
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.qos.storage.QueuePropertyBase
public abstract class QueuePropertyBase
Helper class holding callback queue properties.
See ConnectQos for XML syntax.
ConnectQos
Field Summary | |
---|---|
protected AddressBase[] |
addressArr
The corresponding callback address, is set by derived classes |
protected long |
c
|
protected PropBoolean |
debug
To allow debugging the queue (experimental) |
static long |
DEFAULT_bytesCacheDefault
The max setting allowed for queue max size of cache in bytes is adjustable with property "queue.maxBytesCache=4000000" (4 MBytes is default) |
static long |
DEFAULT_bytesDefault
The max setting allowed for queue max size in bytes is adjustable with property "queue.maxBytes=4194304" (10 MBytes is default) |
long |
DEFAULT_maxEntries
The max setting allowed for queue maxEntries is adjustable with property "queue.maxEntries=1000" (1000 messages is default) |
static long |
DEFAULT_maxEntriesCacheDefault
The max setting allowed for queue maxEntriesCache is adjustable with property "queue.maxEntriesCache=1000" (1000 messages is default) |
static java.lang.String |
DEFAULT_onFailure
Error handling when callback failed (after all retries etc.): Constants.ONOVERFLOW_DEADMESSAGE |
static java.lang.String |
DEFAULT_onOverflow
Error handling when queue is full: Constants.ONOVERFLOW_DEADMESSAGE | Constants.ONOVERFLOW_DISCARDOLDEST |
static double |
DEFAULT_reloadSwapBytesRatio
The default settings (as a ratio relative to the maxBytesCache) for the storeSwapBytes |
static double |
DEFAULT_reloadSwapLevelRatio
The default settings (as a ratio relative to the maxBytesCache) for the storeSwapLevel |
static double |
DEFAULT_storeSwapBytesRatio
The default settings (as a ratio relative to the maxBytesCache) for the storeSwapBytes |
static double |
DEFAULT_storeSwapLevelRatio
The default settings (as a ratio relative to the maxBytesCache) for the storeSwapLevel |
static java.lang.String |
DEFAULT_type
The queue plugin type "CACHE" "RAM" "JDBC" or others |
static java.lang.String |
DEFAULT_version
The queue plugin version "1.0" or similar |
static AddressBase[] |
EMPTY_ADDRESS_ARR
|
protected Global |
glob
|
protected PropLong |
maxBytes
The max. |
protected PropLong |
maxBytesCache
The max. |
protected long |
maxBytesDefault
|
protected PropLong |
maxEntries
The max. |
protected PropLong |
maxEntriesCache
The max. |
protected long |
maxEntriesCacheDefault
|
protected java.lang.String |
nodeId
To allow specific configuration parameters for specific cluster nodes |
protected PropString |
onFailure
|
protected PropString |
onOverflow
|
protected java.lang.String |
relating
The unique queue or storage name, e.g. |
protected long |
reloadSwapBytes
The settings for the storeSwapBytes |
protected long |
reloadSwapLevel
The settings for the reloadSwapLevel |
protected long |
storeSwapBytes
The settings for the storeSwapBytes |
protected long |
storeSwapLevel
The settings for the storeSwapLevel |
protected PropString |
type
|
protected PropString |
version
|
Constructor Summary | |
---|---|
QueuePropertyBase(Global glob,
java.lang.String nodeId)
|
Method Summary | |
---|---|
void |
checkConsistency()
Should be called after parsing |
java.lang.Object |
clone()
Returns a shallow clone, you can change savely all basic or immutable types like boolean, String, int. |
AddressBase[] |
getAddresses()
|
boolean |
getDebug()
|
Global |
getGlobal()
returns the global object |
long |
getMaxBytes()
Max message queue size. |
long |
getMaxBytesCache()
Max message queue size for the cache of this queue. |
PropLong |
getMaxBytesCacheProp()
|
PropLong |
getMaxBytesProp()
|
long |
getMaxEntries()
Max number of messages for this queue. |
long |
getMaxEntriesCache()
Max number of messages for the cache of this queue. |
PropLong |
getMaxEntriesCacheProp()
|
PropLong |
getMaxEntriesProp()
|
java.lang.String |
getOnFailure()
Returns the onFailure. |
java.lang.String |
getOnOverflow()
Returns the onOverflow. |
java.lang.String |
getPrefix()
The command line prefix to configure the queue or msgUnitStore |
java.lang.String |
getPropertyPrefix()
|
java.lang.String |
getPropName(java.lang.String token)
Helper for logging output, creates the property key for configuration (the command line property). |
java.lang.String |
getRelating()
Returns the queue id. |
long |
getReloadSwapBytes()
Gets the reloadSwapBytes for the queue (only used on cache queues). |
long |
getReloadSwapLevel()
Gets the reloadSwapLevel for the queue (only used on cache queues). |
java.lang.String |
getRootTagName()
Defaults to queue for <queue .../>, other used tag name is <persistence .../> |
long |
getStoreSwapBytes()
Gets the storeSwapBytes for the queue (only used on cache queues). |
long |
getStoreSwapLevel()
Gets the storeSwapLevel for the queue (only used on cache queues). |
java.lang.String |
getType()
The plugin type. |
java.lang.String |
getTypeVersion()
The plugin type and version. |
java.lang.String |
getVersion()
The plugin version. |
protected void |
initialize(java.lang.String relating)
Configure property settings, add your own defaults in the derived class |
boolean |
isEmbedded()
|
boolean |
onFailureDeadMessage()
The default mode is to send a dead letter if callback fails permanently |
void |
setDebug(boolean debug)
|
void |
setEmbedded(boolean embedded)
|
void |
setMaxBytes(long maxBytes)
Max message queue size. |
void |
setMaxBytesCache(long maxBytesCache)
Max message queue size for the cache of this queue. |
void |
setMaxEntries(long maxEntries)
Max number of messages for this queue. |
void |
setMaxEntriesCache(long maxEntriesCache)
Max number of messages for the cache of this queue. |
void |
setOnFailure(java.lang.String onFailure)
Set the callback onFailure, it should fit to the protocol-relating. |
void |
setOnOverflow(java.lang.String onOverflow)
Set the callback onOverflow, it should fit to the protocol-relating. |
void |
setRelating(java.lang.String relating)
|
void |
setReloadSwapBytes(long reloadSwapBytes)
Sets the reloadSwapBytes for the queue (only used on cache queues). |
void |
setReloadSwapLevel(long reloadSwapLevel)
Sets the reloadSwapLevel for the queue (only used on cache queues). |
void |
setStoreSwapBytes(long storeSwapBytes)
Sets the storeSwapBytes for the queue (only used on cache queues). |
void |
setStoreSwapLevel(long storeSwapLevel)
Sets the storeSwapLevel for the queue (only used on cache queues). |
void |
setType(java.lang.String type)
The plugin type |
void |
setVersion(java.lang.String version)
The plugin version |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name,
org.xml.sax.Attributes attrs)
Called for queue start tag |
java.lang.String |
toString()
|
java.lang.String |
toXml()
Dump state of this object into a XML ASCII string. |
java.lang.String |
toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string. |
java.lang.String |
usage()
|
java.lang.String |
usage(java.lang.String headerline)
Get a usage string for queue configuration (in xmlBlaster.properties or on command line) |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Global glob
public static final java.lang.String DEFAULT_type
protected PropString type
public static final java.lang.String DEFAULT_version
protected PropString version
public static final long DEFAULT_maxEntriesCacheDefault
protected long maxEntriesCacheDefault
public static final long DEFAULT_bytesDefault
protected long maxBytesDefault
public static final long DEFAULT_bytesCacheDefault
protected long c
public static final double DEFAULT_storeSwapLevelRatio
public static final double DEFAULT_storeSwapBytesRatio
public static final double DEFAULT_reloadSwapLevelRatio
public static final double DEFAULT_reloadSwapBytesRatio
protected java.lang.String relating
public long DEFAULT_maxEntries
protected PropLong maxEntries
protected PropLong maxBytes
protected PropLong maxEntriesCache
protected PropLong maxBytesCache
protected long storeSwapLevel
protected long storeSwapBytes
protected long reloadSwapLevel
protected long reloadSwapBytes
public static final java.lang.String DEFAULT_onOverflow
protected PropString onOverflow
public static final java.lang.String DEFAULT_onFailure
protected PropString onFailure
public static AddressBase[] EMPTY_ADDRESS_ARR
protected AddressBase[] addressArr
protected java.lang.String nodeId
protected PropBoolean debug
Constructor Detail |
---|
public QueuePropertyBase(Global glob, java.lang.String nodeId)
glob
- The global handle containing env informationsnodeId
- If not null, the command line properties will look for prop[nodeId] as well,
e.g. -queue/maxEntries and -queue/maxEntries[heron] will be searchedGlobal.getStrippedId()
Method Detail |
---|
public java.lang.String getPropertyPrefix()
public java.lang.String getPrefix()
public java.lang.String getPropName(java.lang.String token)
prop
- e.g. "maxEntries"
protected void initialize(java.lang.String relating)
relating
- e.g. "history" or "callback", similar to public void setRelating(java.lang.String relating)
relating
- To what is this queue related: Constants.RELATING_CALLBACK | Constants.RELATING_SUBJECT | Constants.RELATING_CLIENTpublic final java.lang.String getRelating()
public final long getMaxEntries()
public final PropLong getMaxEntriesProp()
public final void setMaxEntries(long maxEntries)
maxEntries
- public final java.lang.String getType()
public final void setType(java.lang.String type)
type
- public final java.lang.String getVersion()
public final void setVersion(java.lang.String version)
version
- public final java.lang.String getTypeVersion()
public final long getMaxEntriesCache()
public final PropLong getMaxEntriesCacheProp()
public final void setMaxEntriesCache(long maxEntriesCache)
maxEntriesCache
- public final long getMaxBytes()
public final PropLong getMaxBytesProp()
public final void setMaxBytes(long maxBytes)
public final long getMaxBytesCache()
public final PropLong getMaxBytesCacheProp()
public final long getStoreSwapLevel()
public final void setStoreSwapLevel(long storeSwapLevel)
Set
- storeSwapLevel in bytes.public final long getStoreSwapBytes()
public final void setStoreSwapBytes(long storeSwapBytes)
Set
- storeSwapBytes in bytes.public final long getReloadSwapLevel()
public final void setReloadSwapLevel(long reloadSwapLevel)
Set
- reloadSwapLevel in bytes.public final long getReloadSwapBytes()
public final void setReloadSwapBytes(long reloadSwapBytes)
Set
- reloadSwapBytes in bytes.public final void setMaxBytesCache(long maxBytesCache)
public final void setOnOverflow(java.lang.String onOverflow)
onOverflow
- The callback onOverflow, e.g. "et@mars.univers"public final java.lang.String getOnOverflow()
public final void setOnFailure(java.lang.String onFailure)
onFailure
- The callback onFailure, e.g. "et@mars.univers"public final java.lang.String getOnFailure()
public final boolean onFailureDeadMessage()
public AddressBase[] getAddresses()
public final void startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attrs)
public java.lang.String usage()
public java.lang.String getRootTagName()
public java.lang.String usage(java.lang.String headerline)
public final void checkConsistency()
public final java.lang.String toXml()
public final java.lang.String toXml(java.lang.String extraOffset)
extraOffset
- indenting of tags for nice output
public Global getGlobal()
public java.lang.Object clone()
clone
in class java.lang.Object
public final boolean getDebug()
public final void setDebug(boolean debug)
public void setEmbedded(boolean embedded)
public boolean isEmbedded()
public java.lang.String toString()
toString
in class java.lang.Object
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |