public int getPartition ( K key , V value , int numPartitions ) { Integer result = cache . get ( ) ; if ( result == null ) { return part . getPartition ( key , value , numPartitions ) ; } else { return result ; } }
If a partition result was set manually return it . Otherwise we call the Java partitioner .