Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Event Processing for Oracle Java Embedded
11g Release 1 (11.1.1.7)

E39906-01
FRAMES    NO FRAMES
DETAIL:  FIELD | CONSTR | METHOD


com.bea.wlevs.ede.api
Interface EventQueue

All Known Subinterfaces:
EventChannel, Stream

public interface EventQueue

Method Summary
 int getCurrentSize()
          Returns the current (used) size of channel.
 int getMaxSize()
          Returns maximum size of channel.
 int getMaxThreads()
          Returns maximum number of threads that a channel should use for processing events.
 long getOfferTimeout()
          Returns the timeout value used for waiting up until space becomes available in the event queue.
 boolean isFailWhenRejected()
          Returns true if an event processing exception should be raised when event queue is full and no space is available after offer timeout expires.
 void setFailWhenRejected(boolean value)
          Raise an EventProcessingException if the event queue is full when the offer timeout expires.
 void setMaxSize(int size)
          Maximum number of events that a channel can hold at a time.
 void setMaxThreads(int maxThreads)
          Maximum number of threads that a channel should use for processing events.
 void setOfferTimeout(long timeout)
          Sets the timeout value used when the event queue is full and a pending insert (offer) is blocked.

 

Method Detail

setMaxSize

public void setMaxSize(int size)
                throws java.beans.PropertyVetoException
Maximum number of events that a channel can hold at a time. Only applicable if maxThreads is greater than zero.
Parameters:
size - - the maximum allowable number of retained events
Throws:
java.beans.PropertyVetoException - if size is not valid

getMaxSize

public int getMaxSize()
Returns maximum size of channel. Only applicable if maxThreads is greater than zero.
Returns:
maximum size

getCurrentSize

public int getCurrentSize()
Returns the current (used) size of channel.
Returns:
size - int current size

setMaxThreads

public void setMaxThreads(int maxThreads)
Maximum number of threads that a channel should use for processing events.
Parameters:
threads - - the number of worker threads to use.

getMaxThreads

public int getMaxThreads()
Returns maximum number of threads that a channel should use for processing events. return threads - int the number of worker threads to use.

getOfferTimeout

public long getOfferTimeout()
Returns the timeout value used for waiting up until space becomes available in the event queue. This is only applicable for event queue's whose max-size is greater than 0. The time unit is nanoseconds. The default offer timeout is 60 seconds.
Returns:
long offer timeout

setOfferTimeout

public void setOfferTimeout(long timeout)
Sets the timeout value used when the event queue is full and a pending insert (offer) is blocked. When the timeout expires the pending event will either be dropped or an exception raised, depending on setFailWhenRejected(boolean). This is only applicable for event queue's whose max-size is greater than 0. The time unit is nanoseconds. The default offer timeout is 60 seconds.
Parameters:
timeout - offer timeout

setFailWhenRejected

public void setFailWhenRejected(boolean value)
Raise an EventProcessingException if the event queue is full when the offer timeout expires. If set to false, or not set at all, then the event is dropped rather than exception being raised. This configuration is only applicable for event queue's whose max-size is greater than 0.

The default value is false.

Parameters:
value - true if exception should be raised when rejected, false if event should be dropped instead.

isFailWhenRejected

public boolean isFailWhenRejected()
Returns true if an event processing exception should be raised when event queue is full and no space is available after offer timeout expires. If set to false, then event is dropped rather than exception being raised. This configuration is only applicable for event queue's whose max-size is greater than 0. If this is not the case, then configuration is ignored.
Returns:
boolean true if exception should be raised when rejected, false if event should be dropped instead.

Overview  Package   Class   Use  Tree  Deprecated  Index  Help 
Copyright © 2007, 2013 Oracle and/or its affiliates. All rights reserved.
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD