Skip navigation links

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09


weblogic.j2ee.descriptor.wl
Interface QuotaBean

All Superinterfaces:
NamedEntityBean, SettableBean

public interface QuotaBean
extends NamedEntityBean

Quota beans control the allotment of system resources available to destinations. For example, the number of bytes a destination is allowed to store can be configured with a QuotaBean.


Method Summary
abstract  long getBytesMaximum()
          The total number of bytes that can be stored in a destination that uses this quota.
abstract  long getMessagesMaximum()
          The total number of messages that can be stored in a destination that uses this quota.
abstract  String getPolicy()
          For destinations that use this quota, this policy determines whether to deliver smaller messages before larger ones when a destination has exceeded its message quota.
abstract  boolean isShared()
          Indicates whether this quota is shared by multiple destinations that refer to it.
abstract  void setBytesMaximum(long bytesMaximum)
          Sets the value of the BytesMaximum attribute.
abstract  void setMessagesMaximum(long messagesMaximum)
          Sets the value of the MessagesMaximum attribute.
abstract  void setPolicy(String policy)
          Sets the value of the Policy attribute.
abstract  void setShared(boolean shared)
          Sets the value of the Shared attribute.

 

Methods inherited from interface weblogic.j2ee.descriptor.wl.NamedEntityBean
getId, getName, getNotes, setName, setNotes

 

Method Detail

getBytesMaximum

long getBytesMaximum()

The total number of bytes that can be stored in a destination that uses this quota.

A value of zero means that no messages can be placed on a destination without exceeding the quota. A value of -1 prevents WebLogic Server from imposing a limit.

Because excessive bytes volume can cause memory saturation, Oracle recommends that the maximum corresponds to the amount of system memory that is available after accounting for the rest of your application load.

No consideration is given to messages that are pending; that is, messages that are in-flight, delayed, or otherwise inhibited from delivery still count against the message and/or bytes quota.

.

This attribute is dynamic and can be changed at any time. If the quota is lowered and the quota object is now over quota, then subsequent requests for quota will be denied until quota is available. If the quota is raised, then this may allow the quota object to satisfy existing requests for quota.

Note: If a JMS template is used for distributed destination members, then this maximum applies only to those specific members and not the distributed destination set as a whole.

Returns:
The maximum bytes allowed on this destination

setBytesMaximum

void setBytesMaximum(long bytesMaximum)
                     throws IllegalArgumentException

Sets the value of the BytesMaximum attribute.

Parameters:
bytesMaximum - The maximum number of bytes to be allowed on this destination
Throws:
IllegalArgumentException
See Also:
QuotaBean.getBytesMaximum()

getMessagesMaximum

long getMessagesMaximum()

The total number of messages that can be stored in a destination that uses this quota.

A value of zero means that no messages can be placed on a destination without exceeding the quota. A value of -1 prevents WebLogic Server from imposing a limit.

Because excessive bytes volume can cause memory saturation, Oracle recommends that the maximum corresponds to the amount of system memory that is available after accounting for the rest of your application load.

No consideration is given to messages that are pending; that is, messages that are in-flight, delayed, or otherwise inhibited from delivery still count against the message and/or bytes quota.

.

This attribute is dynamic and can be changed at any time. If the quota is lowered and the quota object is now over quota, then subsequent requests for quota will be denied until quota is available. If the quota is raised, then this may allow the quota object to satisfy existing requests for quota.

Note: If a JMS template is used for distributed destination members, then this maximum applies only to those specific members and not the distributed destination set as a whole.

Returns:
The maximum number of messages on this destination

setMessagesMaximum

void setMessagesMaximum(long messagesMaximum)
                        throws IllegalArgumentException

Sets the value of the MessagesMaximum attribute.

Parameters:
messagesMaximum - The maximum number of messages to be allowed on this destination
Throws:
IllegalArgumentException
See Also:
QuotaBean.getMessagesMaximum()

getPolicy

String getPolicy()

For destinations that use this quota, this policy determines whether to deliver smaller messages before larger ones when a destination has exceeded its message quota.

FIFO (first-in, first-out) indicates that requests for quota are submitted in the order they are received. If a given request for quota cannot be satisfied, and the client requesting the quota is willing to wait, then that request will block all other requests for quota until the request is satisfied or times out. This prevents smaller messages from being delivered when larger requests are already waiting for space.

Preemptive indicates that subsequent requests can preempt previously unsatisfied requests. That is, if there is sufficient quota for the current request, then that space is used even if there are other requests waiting for quota. When quota is limited, the Preemptive policy can result in the starvation of larger requests.

Returns:
The policy to be used on this quota

setPolicy

void setPolicy(String policy)
               throws IllegalArgumentException

Sets the value of the Policy attribute.

Parameters:
policy - The policy to be used with this quota
Throws:
IllegalArgumentException
See Also:
QuotaBean.getPolicy()

isShared

boolean isShared()

Indicates whether this quota is shared by multiple destinations that refer to it.

If Shared is enabled (the default), all destinations referring to the quota object compete for resources the resources defined by that object. If one destination consumes a large number of messages or bytes, then this will prevent other destinations from obtaining quota.

If Shared is disabled, the quota object behaves as a template. Each destination referring to the quota object gets its own internal instance of the object for tracking quota.

Destinations within the same JMS module may share quotas in any way they want. However, quota sharing only takes place for destinations within the same JMS server. In other words, if destinations X and Y both share the same quota Q, and the quota Q has Shared enabled, then X and Y will only share quota if both are deployed to the same JMS server.

Returns:
true if this quota should be shared by all destinations that point to it, false if each destination pointing to this quota should behave as though it is the only one pointing to this quota

setShared

void setShared(boolean shared)
               throws IllegalArgumentException

Sets the value of the Shared attribute.

Parameters:
shared - true if this quota should be shared by all destinations that point to it, false if each destination pointing to this quota should behave as though it is the only one pointing to this quota
Throws:
IllegalArgumentException
See Also:
QuotaBean.isShared()

Skip navigation links

Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09