akka.dispatch
Class PriorityGenerator

java.lang.Object
  extended by akka.dispatch.PriorityGenerator
All Implemented Interfaces:
java.util.Comparator<Envelope>

public abstract class PriorityGenerator
extends java.lang.Object
implements java.util.Comparator<Envelope>

A PriorityGenerator is a convenience API to create a Comparator that orders the messages of a PriorityDispatcher


Constructor Summary
PriorityGenerator()
           
 
Method Summary
static PriorityGenerator apply(scala.Function1<java.lang.Object,java.lang.Object> priorityFunction)
          Creates a PriorityGenerator that uses the supplied function as priority generator
 int compare(Envelope thisMessage, Envelope thatMessage)
           
abstract  int gen(java.lang.Object message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

PriorityGenerator

public PriorityGenerator()
Method Detail

apply

public static PriorityGenerator apply(scala.Function1<java.lang.Object,java.lang.Object> priorityFunction)
Creates a PriorityGenerator that uses the supplied function as priority generator

Parameters:
priorityFunction - (undocumented)
Returns:
(undocumented)

gen

public abstract int gen(java.lang.Object message)

compare

public final int compare(Envelope thisMessage,
                         Envelope thatMessage)
Specified by:
compare in interface java.util.Comparator<Envelope>