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

How to use
getWriteOwners
method
in
org.infinispan.distribution.LocalizedCacheTopology

Best Java code snippets using org.infinispan.distribution.LocalizedCacheTopology.getWriteOwners (Showing top 4 results out of 315)

origin: org.infinispan/infinispan-core

public void testLocationConsensus() {
 String[] keys = new String[100];
 Random r = new Random();
 for (int i = 0; i < 100; i++) keys[i] = Integer.toHexString(r.nextInt());
 for (String key : keys) {
   List<Address> owners = new ArrayList<>();
   for (Cache<Object, String> c : caches) {
    boolean isOwner = isOwner(c, key);
    if (isOwner) owners.add(addressOf(c));
    boolean secondCheck = getCacheTopology(c).getWriteOwners(key).contains(addressOf(c));
    assertTrue("Second check failed for key " + key + " on cache " + addressOf(c) + " isO = " + isOwner + " sC = " + secondCheck, isOwner == secondCheck);
   }
   // check consensus
   assertOwnershipConsensus(key);
   assertEquals("Expected " + numOwners + " owners for key " + key + " but was " + owners, numOwners, owners.size());
 }
}
origin: org.infinispan/infinispan-core

 log.infof("Skipping test on failing key %s", key);
} else {
 Collection<Address> owners = cacheTopology.getWriteOwners(key);
 for (Map.Entry<Address, Cache<Object, Object>> e : cacheMap.entrySet()) {
   try {
origin: org.infinispan/infinispan-core

final Collection<Address> locate = advancedCache(0).getDistributionManager().getCacheTopology().getWriteOwners(key);
for (int i = 3; i > 0; i--) {
  if (locate.contains(address(i))) {
origin: org.infinispan/infinispan-core

int nextKey = minKey;
Address targetNode;
Iterator<Address> owners = lct.getWriteOwners(dc.toStorage(nextKey)).iterator();
if (onPrimary) {
 targetNode = owners.next();
org.infinispan.distributionLocalizedCacheTopologygetWriteOwners

Popular methods of LocalizedCacheTopology

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

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top 12 Jupyter Notebook extensions
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