📄 queuepropertybase.java
字号:
* The plugin type. * <br /> * @return e.g. "CACHE" or null to choose current configured default plugin */ public final String getType() { return this.type.getValue(); } /** * The plugin type * <br /> * @param type */ public final void setType(String type) { this.type.setValue(type); } /** * The plugin version. * <br /> * @return e.g. "1.0" or null to configure current default plugin */ public final String getVersion() { return this.version.getValue(); } /** * The plugin version * <br /> * @param version */ public final void setVersion(String version) { this.version.setValue(version); } /** * The plugin type and version. * <br /> * @return e.g. "RAM,1.0" or null to configure current default plugin */ public final String getTypeVersion() { return getType() + "," + getVersion(); } /** * Max number of messages for the cache of this queue. * <br /> * @return number of messages */ public final long getMaxEntriesCache() { return this.maxEntriesCache.getValue(); } public final PropLong getMaxEntriesCacheProp() { return this.maxEntriesCache; } /** * Max number of messages for the cache of this queue. * <br /> * @param maxEntriesCache */ public final void setMaxEntriesCache(long maxEntriesCache) { this.maxEntriesCache.setValue(maxEntriesCache); //checkConsistency(); } private final void setMaxEntriesCacheUnchecked(long maxEntriesCache) { this.maxEntriesCache.setValue(maxEntriesCache); } /** * Max message queue size. * <br /> * @return Get max. message queue size in Bytes */ public final long getMaxBytes() { return this.maxBytes.getValue(); } public final PropLong getMaxBytesProp() { return this.maxBytes; } /** * Max message queue size. * <br /> * @return Set max. message queue size in Bytes */ public final void setMaxBytes(long maxBytes) { this.maxBytes.setValue(maxBytes); //checkConsistency(); } private final void setMaxBytesUnchecked(long maxBytes) { this.maxBytes.setValue(maxBytes); } /** * Max message queue size for the cache of this queue. * <br /> * @return Get max. message queue size in Bytes */ public final long getMaxBytesCache() { return this.maxBytesCache.getValue(); } public final PropLong getMaxBytesCacheProp() { return this.maxBytesCache; } /** * Gets the storeSwapLevel for the queue (only used on cache queues). * <br /> * @return Get storeSwapLevel in bytes. */ public final long getStoreSwapLevel() { return this.storeSwapLevel; } /** * Sets the storeSwapLevel for the queue (only used on cache queues). * <br /> * @param Set storeSwapLevel in bytes. */ public final void setStoreSwapLevel(long storeSwapLevel) { this.storeSwapLevel = storeSwapLevel; } /** * Gets the storeSwapBytes for the queue (only used on cache queues). * <br /> * @return Get storeSwapBytes in bytes. */ public final long getStoreSwapBytes() { return this.storeSwapBytes; } /** * Sets the storeSwapBytes for the queue (only used on cache queues). * <br /> * @param Set storeSwapBytes in bytes. */ public final void setStoreSwapBytes(long storeSwapBytes) { this.storeSwapBytes = storeSwapBytes; } /** * Gets the reloadSwapLevel for the queue (only used on cache queues). * <br /> * @return Get reloadSwapLevel in bytes. */ public final long getReloadSwapLevel() { return this.reloadSwapLevel; } /** * Sets the reloadSwapLevel for the queue (only used on cache queues). * <br /> * @param Set reloadSwapLevel in bytes. */ public final void setReloadSwapLevel(long reloadSwapLevel) { this.reloadSwapLevel = reloadSwapLevel; } /** * Gets the reloadSwapBytes for the queue (only used on cache queues). * <br /> * @return Get reloadSwapBytes in bytes. */ public final long getReloadSwapBytes() { return this.reloadSwapBytes; } /** * Sets the reloadSwapBytes for the queue (only used on cache queues). * <br /> * @param Set reloadSwapBytes in bytes. */ public final void setReloadSwapBytes(long reloadSwapBytes) { this.reloadSwapBytes = reloadSwapBytes; } /** * Max message queue size for the cache of this queue. * <br /> * @return Set max. message queue size in Bytes */ public final void setMaxBytesCache(long maxBytesCache) { this.maxBytesCache.setValue(maxBytesCache); //checkConsistency(); } private final void setMaxBytesCacheUnchecked(long maxBytesCache) { this.maxBytesCache.setValue(maxBytesCache); } /** * Set the callback onOverflow, it should fit to the protocol-relating. * * @param onOverflow The callback onOverflow, e.g. "et@mars.univers" */ public final void setOnOverflow(String onOverflow) { /* if (Constants.ONOVERFLOW_BLOCK.equalsIgnoreCase(onOverflow)) { this.onOverflow = Constants.ONOVERFLOW_BLOCK; } */ if (Constants.ONOVERFLOW_DEADMESSAGE.equalsIgnoreCase(onOverflow)) { this.onOverflow.setValue(Constants.ONOVERFLOW_DEADMESSAGE); } else if (Constants.ONOVERFLOW_DISCARDOLDEST.equalsIgnoreCase(onOverflow)) { this.onOverflow.setValue(Constants.ONOVERFLOW_DISCARDOLDEST); this.onOverflow.setValue(Constants.ONOVERFLOW_DEADMESSAGE); // TODO !!! log.severe(getRootTagName() + " onOverflow='" + Constants.ONOVERFLOW_DISCARDOLDEST + "' is not implemented, switching to " + this.onOverflow + " mode"); } else { this.onOverflow.setValue(Constants.ONOVERFLOW_DEADMESSAGE); log.warning("The " + getRootTagName() + " onOverflow attribute is invalid '" + onOverflow + "', setting to '" + this.onOverflow + "'"); } } /** * Returns the onOverflow. * @return e.g. "IOR:00001100022...." or "et@universe.com" */ public final String getOnOverflow() { return onOverflow.getValue(); } /* * The default mode, when queue is full the publisher blocks until * there is space again. public final boolean onOverflowBlock() { if (Constants.ONOVERFLOW_BLOCK.equalsIgnoreCase(getOnOverflow())) return true; return false; } */ /** * Set the callback onFailure, it should fit to the protocol-relating. * * @param onFailure The callback onFailure, e.g. "et@mars.univers" */ public final void setOnFailure(String onFailure) { if (Constants.ONOVERFLOW_DEADMESSAGE.equalsIgnoreCase(onFailure)) this.onFailure.setValue(Constants.ONOVERFLOW_DEADMESSAGE); else { log.warning("The " + getRootTagName() + " onFailure attribute is invalid '" + onFailure + "', setting to 'deadMessage'"); this.onFailure.setValue(Constants.ONOVERFLOW_DEADMESSAGE); } } /** * Returns the onFailure. * @return e.g. "IOR:00001100022...." or "et@universe.com" */ public final String getOnFailure() { return onFailure.getValue(); } /** * The default mode is to send a dead letter if callback fails permanently */ public final boolean onFailureDeadMessage() { if (Constants.ONOVERFLOW_DEADMESSAGE.equalsIgnoreCase(getOnFailure())) return true; return false; } /** * @return null if none available */ public AddressBase[] getAddresses() { return this.addressArr; } /** * Called for queue start tag
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -