Skip navigation links

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

E14303-11
FRAMES    NO FRAMES
DETAIL:  FIELD | CONSTR | METHOD


com.bea.wlevs.channel
Interface EventPartitioner


public interface EventPartitioner

An EventPartitioner provides a mechanism for end-users to configure their own custom strategy for partitioning events on a channel across its output event sinks.

To associate an EventPartitioner to an event channel, use the channel's instance-property eventPartitioner.

See Also:
EventChannel, ActivatableBean

Method Summary
 void activateConfiguration(int numberOfPartitions, EventType eventType)
          Specifies the number of partitions that are downstream to this node, and the event type of the event channel in which this EventPartitioner is associated to.
 int partition(java.lang.Object event)
          Return integer representing index of listener connected to a Event Channel.

 

Method Detail

activateConfiguration

public void activateConfiguration(int numberOfPartitions,
                                  EventType eventType)
Specifies the number of partitions that are downstream to this node, and the event type of the event channel in which this EventPartitioner is associated to. This method is guaranteed to be called before ActivatableBean.afterConfigurationActive() and before partition(). However, because it relies on information related to the EPN, there are no guarantees that it will be called before InitializingBean.afterPropertiesSet().
Parameters:
numberOfPartitions - number of partitions downstream to this node.
eventType - channel's event type.

partition

public int partition(java.lang.Object event)
              throws EventProcessingException
Return integer representing index of listener connected to a Event Channel. Event will be routed to this single listener, instead of being broadcasted to all connected listeners.
Parameters:
event - - event being processed
Returns:
int - must be in the range of [0, number of connected listeners[
Throws:
EventProcessingException -  

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