|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.affinity.KeyAffinityServiceFactory
public class KeyAffinityServiceFactory
Factory for KeyAffinityService.
Services build by this factory have the following characteristics:
ExecutorFactory ConsistentHash function of a distributed cache is used. Service does not make sense for replicated caches.Address member, a fixed number of keys is generated
KeyAffinityService| Constructor Summary | |
|---|---|
KeyAffinityServiceFactory()
|
|
| Method Summary | ||
|---|---|---|
static
|
newKeyAffinityService(Cache<K,V> cache,
Collection<Address> filter,
KeyGenerator keyGenerator,
Executor ex,
int keyBufferSize)
Same as newKeyAffinityService(org.infinispan.Cache, java.util.Collection, KeyGenerator,
java.util.concurrent.Executor, int, boolean) with start == true. |
|
static
|
newKeyAffinityService(Cache<K,V> cache,
Collection<Address> filter,
KeyGenerator keyGenerator,
Executor ex,
int keyBufferSize,
boolean start)
Creates a service that would only generate keys for addresses specified in filter. |
|
static
|
newKeyAffinityService(Cache<K,V> cache,
Executor ex,
KeyGenerator keyGenerator,
int keyBufferSize)
Same as newKeyAffinityService(org.infinispan.Cache, java.util.concurrent.Executor, KeyGenerator, int,
boolean) with start == true; |
|
static
|
newKeyAffinityService(Cache<K,V> cache,
Executor ex,
KeyGenerator keyGenerator,
int keyBufferSize,
boolean start)
Creates an KeyAffinityService instance that generates keys mapped to all addresses
in the cluster. |
|
static
|
newLocalKeyAffinityService(Cache<K,V> cache,
KeyGenerator keyGenerator,
Executor ex,
int keyBufferSize)
Same as newLocalKeyAffinityService(org.infinispan.Cache, KeyGenerator, java.util.concurrent.Executor, int, boolean) with start == true. |
|
static
|
newLocalKeyAffinityService(Cache<K,V> cache,
KeyGenerator keyGenerator,
Executor ex,
int keyBufferSize,
boolean start)
Created an service that only generates keys for the local address. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KeyAffinityServiceFactory()
| Method Detail |
|---|
public static <K,V> KeyAffinityService<K> newKeyAffinityService(Cache<K,V> cache,
Executor ex,
KeyGenerator keyGenerator,
int keyBufferSize,
boolean start)
KeyAffinityService instance that generates keys mapped to all addresses
in the cluster. Changes in topology would also noticed: by adding a new node, the service will automatically start
generating keys for it.
cache - the distributed cache for which this service runsex - used for running async key generation process. On service shutdown, the executor won't be
stopped; i.e. it's user responsibility manage it's lifecycle.keyGenerator - allows one to control how the generated keys look like.keyBufferSize - the number of generated keys per Address.start - weather to start the service or not
KeyAffinityService implementation.
IllegalStateException - if the supplied cache is not DIST.
public static <K,V> KeyAffinityService<K> newKeyAffinityService(Cache<K,V> cache,
Executor ex,
KeyGenerator keyGenerator,
int keyBufferSize)
newKeyAffinityService(org.infinispan.Cache, java.util.concurrent.Executor, KeyGenerator, int,
boolean) with start == true;
public static <K,V> KeyAffinityService newKeyAffinityService(Cache<K,V> cache,
Collection<Address> filter,
KeyGenerator keyGenerator,
Executor ex,
int keyBufferSize,
boolean start)
filter - the set of addresses for which to generate keys
public static <K,V> KeyAffinityService newKeyAffinityService(Cache<K,V> cache,
Collection<Address> filter,
KeyGenerator keyGenerator,
Executor ex,
int keyBufferSize)
newKeyAffinityService(org.infinispan.Cache, java.util.Collection, KeyGenerator,
java.util.concurrent.Executor, int, boolean) with start == true.
public static <K,V> KeyAffinityService newLocalKeyAffinityService(Cache<K,V> cache,
KeyGenerator keyGenerator,
Executor ex,
int keyBufferSize,
boolean start)
public static <K,V> KeyAffinityService newLocalKeyAffinityService(Cache<K,V> cache,
KeyGenerator keyGenerator,
Executor ex,
int keyBufferSize)
newLocalKeyAffinityService(org.infinispan.Cache, KeyGenerator, java.util.concurrent.Executor, int, boolean) with start == true.
|
Google Analytics | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||