congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
LocalizedCacheTopology.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.infinispan.distribution.LocalizedCacheTopology
constructor

Best Java code snippets using org.infinispan.distribution.LocalizedCacheTopology.<init> (Showing top 7 results out of 315)

origin: wildfly/wildfly

public ConsistentHashLocality(Cache<?, ?> cache, ConsistentHash hash) {
  this.topology = new LocalizedCacheTopology(cache.getCacheConfiguration().clustering().cacheMode(), new CacheTopology(0, 0, hash, null, CacheTopology.Phase.NO_REBALANCE, Collections.emptyList(), Collections.emptyList()), cache.getCacheConfiguration().clustering().hash().keyPartitioner(), cache.getCacheManager().getAddress(), true);
}
origin: org.infinispan/infinispan-core

@Override
public LocalizedCacheTopology getCacheTopology() {
  List<Address> members = Arrays.asList(PRIMARY, BACKUP, NON_OWNER);
  List<Address>[] ownership = new List[]{Arrays.asList(PRIMARY, BACKUP)};
  ConsistentHash ch = new DefaultConsistentHash(MurmurHash3.getInstance(), 2, 1, members, null, ownership);
  CacheTopology cacheTopology = new CacheTopology(0, 0, ch, null, CacheTopology.Phase.NO_REBALANCE, null, null);
  Address localAddress = isPrimaryOwner ? PRIMARY : (isOwner ? BACKUP : NON_OWNER);
  return new LocalizedCacheTopology(CacheMode.DIST_SYNC, cacheTopology, key -> 0, localAddress, true);
}
origin: org.infinispan/infinispan-core

private static LocalizedCacheTopology mockCacheTopology(int topologyId) {
 List<Address> members = Collections.singletonList(LOCAL_ADDRESS);
 ConsistentHash ch = new ReplicatedConsistentHash(MurmurHash3.getInstance(), members, new int[]{0});
 CacheTopology cacheTopology = new CacheTopology(topologyId, 0, ch, null, CacheTopology.Phase.NO_REBALANCE, members, null);
 return new LocalizedCacheTopology(CacheMode.DIST_SYNC, cacheTopology, key -> 0, LOCAL_ADDRESS, true);
}
origin: org.wildfly/wildfly-clustering-infinispan-spi

public ConsistentHashLocality(Cache<?, ?> cache, ConsistentHash hash) {
  this.topology = new LocalizedCacheTopology(cache.getCacheConfiguration().clustering().cacheMode(), new CacheTopology(0, 0, hash, null, CacheTopology.Phase.NO_REBALANCE, Collections.emptyList(), Collections.emptyList()), cache.getCacheConfiguration().clustering().hash().keyPartitioner(), cache.getCacheManager().getAddress(), true);
}
origin: org.infinispan/infinispan-core

private LocalizedCacheTopology createLocalizedCacheTopology(int numberOfNodes) {
 ConsistentHash hash = createConsistentHash(numberOfNodes);
 CacheTopology topology = new CacheTopology(-1,  -1, hash, null, CacheTopology.Phase.NO_REBALANCE, hash.getMembers(), null);
 return new LocalizedCacheTopology(CacheMode.DIST_SYNC, topology, new HashFunctionPartitioner(), hash.getMembers().get(0), true);
}
origin: org.infinispan/infinispan-core

                         CacheTopology.Phase.READ_OLD_WRITE_ALL, ch1.getMembers(),
                         persistentUUIDManager.mapAddresses(ch1.getMembers()));
this.cacheTopology = new LocalizedCacheTopology(CacheMode.DIST_SYNC, simpleTopology, keyPartitioner, A, true);
stateProvider.onTopologyUpdate(this.cacheTopology, false);
                        ch2.getMembers(),
                        persistentUUIDManager.mapAddresses(ch2.getMembers()));
this.cacheTopology = new LocalizedCacheTopology(CacheMode.DIST_SYNC, simpleTopology, keyPartitioner, A, true);
stateProvider.onTopologyUpdate(this.cacheTopology, true);
origin: org.infinispan/infinispan-core

                        ch1.getMembers(),
                        persistentUUIDManager.mapAddresses(ch1.getMembers()));
this.cacheTopology = new LocalizedCacheTopology(CacheMode.DIST_SYNC, simpleTopology, keyPartitioner, A, true);
stateProvider.onTopologyUpdate(this.cacheTopology, false);
                        ch2.getMembers(),
                        persistentUUIDManager.mapAddresses(ch2.getMembers()));
this.cacheTopology = new LocalizedCacheTopology(CacheMode.DIST_SYNC, simpleTopology, keyPartitioner, A, true);
stateProvider.onTopologyUpdate(this.cacheTopology, false);
org.infinispan.distributionLocalizedCacheTopology<init>

Popular methods of LocalizedCacheTopology

  • getDistribution
  • getSegment
  • getTopologyId
  • getActualMembers
  • getCurrentCH
  • getMembers
  • getPhase
  • isReadOwner
  • isWriteOwner
  • getLocalAddress
  • getMembersPersistentUUIDs
  • getPendingCH
  • getMembersPersistentUUIDs,
  • getPendingCH,
  • getReadConsistentHash,
  • getRebalanceId,
  • getUnionCH,
  • getWriteConsistentHash,
  • getWriteOwners

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • runOnUiThread (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JCheckBox (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now