cgl.narada.matching
Class EventDestinations

java.lang.Object
  extended by cgl.narada.matching.EventDestinations

public class EventDestinations
extends Object

This class is primarily used to maintain predicate counts for destinations during the matching process' traversal through the profile graph. This class is used by the stable storages to maintain reference counts associated with an event. These reference counts are used by the system to facilitate a distributed garbage collection scheme for the stable storages responsible for storing events for disconnected clients.


Constructor Summary
EventDestinations()
           
EventDestinations(byte[] eventDestBytes)
          This constructor provides the unmarshalling of a byte stream representation of the event destinations
 
Method Summary
 byte[] getBytes()
          This is the marshalling operation which we need, to write the byte stream to the stable storage.
 int getDestinations()
          Returns the list of destinations associated with the event
 int[] getPredicateCountForDestinations()
          Returns the predicate count associated with the destinations
static void main(String[] args)
           
 void reducePredicateCountForDestination(int destination, int predicateCount)
           
 String toString()
          Provides us with a string representation of event destinations
 void updateWithDestinationsAndPredicateCount(int _destinations, int[] predicateCount)
          This method is responsible for updating the destinations, and the predicate counts associated with these destinations to account for the interest of predicates/destinations in a particular event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventDestinations

public EventDestinations()

EventDestinations

public EventDestinations(byte[] eventDestBytes)
This constructor provides the unmarshalling of a byte stream representation of the event destinations

Parameters:
eventDestBytes - The marshalled stream containing event destinations
Method Detail

updateWithDestinationsAndPredicateCount

public void updateWithDestinationsAndPredicateCount(int _destinations,
                                                    int[] predicateCount)
This method is responsible for updating the destinations, and the predicate counts associated with these destinations to account for the interest of predicates/destinations in a particular event. This is of interest to those nodes which have access to a stable storage.

Parameters:
_destinations - The destinations associated with an event.
predicateCount - The count associated with individual destinations for the event.

getDestinations

public int getDestinations()
Returns the list of destinations associated with the event


getPredicateCountForDestinations

public int[] getPredicateCountForDestinations()
Returns the predicate count associated with the destinations

Returns:
The predicate count associated with individual destinations.

toString

public String toString()
Provides us with a string representation of event destinations

Overrides:
toString in class Object

getBytes

public byte[] getBytes()
This is the marshalling operation which we need, to write the byte stream to the stable storage.

Returns:
The byte stream representation of event destinations

reducePredicateCountForDestination

public void reducePredicateCountForDestination(int destination,
                                               int predicateCount)

main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project