cgl.narada.matching
Class ProfileCounts

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

public class ProfileCounts
extends Object

Keeps track of broker destinations and profile counts per each of these destinations.


Constructor Summary
ProfileCounts()
           
 
Method Summary
 boolean decrementCountForDestination(int destination)
          Decrease the count associated with the destination.
 int determinePositionOf1Bit(int destination)
          Determines the position of "1" in the byte representation of the destintion.
 int getDestinations()
           
 void incrementCountForDestination(int destination)
          Increase the count associated with the destination.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileCounts

public ProfileCounts()
Method Detail

getDestinations

public int getDestinations()

incrementCountForDestination

public void incrementCountForDestination(int destination)
Increase the count associated with the destination. If this destination does not appear in the set of destinations, add it to the destination set and set up the destination count to 1.


decrementCountForDestination

public boolean decrementCountForDestination(int destination)
Decrease the count associated with the destination. If the count for a destination is reduced to zero as a result of this operation, remove the destination from the list of valid destinations for the event. If the destination is now reduced to zero, return true indicating that the profile be removed since the destinations associated with it has now reduced to zero


determinePositionOf1Bit

public int determinePositionOf1Bit(int destination)
Determines the position of "1" in the byte representation of the destintion. This method expects only a single "1" bit in a given binary representation.


main

public static void main(String[] args)


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