Package oracle.jdbc.aq
Class AQEnqueueOptions
java.lang.Object
oracle.jdbc.aq.AQEnqueueOptions
Specifies the options available for the enqueue operation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the delivery option.byte[]Returns the relative message id.booleanReturns the value of the enqueued message id option.Returns the sequence deviation.Returns the value of transformation option.Returns the transactional behavior.voidsetDeliveryMode(AQEnqueueOptions.DeliveryMode delivery) Specifies the delivery mode: persistent or buffered.voidsetRelativeMessageId(byte[] relativeMessageId) Deprecated.voidsetRetrieveMessageId(boolean retrieveIt) Set this to true to retrieve the message id back from the server when the message has been enqueued.voidsetSequenceDeviation(AQEnqueueOptions.SequenceDeviationOption sequenceDeviation) Deprecated.voidsetTransformation(String _transformation) Specifies a transformation that will be applied before enqueuing the message.voidsetVisibility(AQEnqueueOptions.VisibilityOption visibility) Specifies the transactional behavior of the enqueue request.toString()
-
Constructor Details
-
AQEnqueueOptions
public AQEnqueueOptions()Construct the default enqueue options.
-
-
Method Details
-
setRelativeMessageId
Deprecated.Specifies the message identifier of the message which is referenced in the sequence deviation operation. This value is valid if and only ifSequenceDeviationOption.BEFOREis specified in setSequenceDeviation and is ignored if the sequence deviation is not specified.This feature is deprecated and may be removed in a future release.
- Parameters:
relativeMessageId- relative message id- Throws:
SQLException
-
getRelativeMessageId
public byte[] getRelativeMessageId()Returns the relative message id.- See Also:
-
setSequenceDeviation
public void setSequenceDeviation(AQEnqueueOptions.SequenceDeviationOption sequenceDeviation) throws SQLException Deprecated.Specifies whether the message being enqueued should be dequeued before other message(s) already in the queue. This feature is deprecated for new applications, but it is retained for compatibility.- Parameters:
sequenceDeviation- the possible values are:SequenceDeviationOption.BOTTOMSequenceDeviationOption.BEFORESequenceDeviationOption.TOP
- Throws:
SQLException
-
getSequenceDeviation
Returns the sequence deviation. -
setVisibility
Specifies the transactional behavior of the enqueue request.- Parameters:
visibility- The possible options are:ENQUEUE_ON_COMMITENQUEUE_IMMEDIATE
- Throws:
SQLException
-
getVisibility
Returns the transactional behavior.- See Also:
-
setDeliveryMode
Specifies the delivery mode: persistent or buffered. Note that buffered message are more performant but persistent ones are safer.Possible values are:
- ENQUEUE_BUFFERED - to enqueue a buffered message
- ENQUEUE_PERSISTENT - to enqueue a persistent message. This is the default.
- Parameters:
delivery- the delivery mode- Throws:
SQLException
-
getDeliveryMode
Returns the delivery option.- See Also:
-
setRetrieveMessageId
public void setRetrieveMessageId(boolean retrieveIt) Set this to true to retrieve the message id back from the server when the message has been enqueued.By default the message id won't be retrieved.
- Parameters:
retrieveIt- the enqueued message id option
-
getRetrieveMessageId
public boolean getRetrieveMessageId()Returns the value of the enqueued message id option.- See Also:
-
setTransformation
Specifies a transformation that will be applied before enqueuing the message. The return type of the transformation function must match the type of the queue.Transformations must be created in PLSQL using
DBMS_TRANSFORM.CREATE_TRANSFORMATION(...).For example if the transformation 'OBJ2XML' has been created under the schema 'SCOTT' then it can be specified in the dequeue option with
enqueueOption.setTransformation("SCOTT.OBJ2XML").- Parameters:
_transformation- the transformation
-
getTransformation
Returns the value of transformation option.- See Also:
-
toString
-