package com.leansoft.luxun.producer;

/**
 * Send messages to specific broker(server)
 * 
 * @author bulldog
 *
 */
public interface IPartitioner<T> {

	/**
	 * Uses the key to calculate a broker id for routing the data to the appropriate broker.
	 * 
	 * @param key partition key
	 * @param numBrokers number of brokers
	 * @return broker id
	 */
	int partition(T key, int numBrokers);
	
}

@@ -139,17 +139,17 @@
 itioner%3C
-T
+K
 %3E %7B%0A%0A%09/*
@@ -360,9 +360,9 @@
 ion(
-T
+K
  key

update naming of generic parameter