public static < K , V > KeyAffinityService < K > newLocalKeyAffinityService ( Cache < K , V > cache , KeyGenerator < K > keyGenerator , Executor ex , int keyBufferSize , boolean start ) { Address localAddress = cache . getAdvancedCache ( ) . getRpcManager ( ) . getTransport ( ) . getAddress ( ) ; Collection < Address > forAddresses = Collections . singletonList ( localAddress ) ; return newKeyAffinityService ( cache , forAddresses , keyGenerator , ex , keyBufferSize , start ) ; }
Created an service that only generates keys for the local address .