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

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

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

origin: org.infinispan/infinispan-server-hotrod

public static byte[] newKey(Cache<?, ?> cache) throws Exception {
 LocalizedCacheTopology cacheTopology = cache.getAdvancedCache().getDistributionManager().getCacheTopology();
 Random r = new Random();
 JBossMarshaller sm = new JBossMarshaller();
 for (int i = 0; i < 1000; i++) {
   String candidate = String.valueOf(r.nextLong());
   byte[] candidateBytes = sm.objectToByteBuffer(candidate, 64);
   if (cacheTopology.isReadOwner(candidateBytes)) {
    return candidateBytes;
   }
 }
 throw new RuntimeException("Unable to find a key local to node " + cache);
}
origin: org.infinispan/infinispan-core

assertTrue(dm0.getCacheTopology().isReadOwner("k1"));
assertTrue(dm0.getCacheTopology().isReadOwner("k2"));
assertTrue(dm0.getCacheTopology().isReadOwner("k3"));
assertEquals("v1", cache(0).get("k1"));
assertEquals("v2", cache(0).get("k2"));
origin: org.infinispan/infinispan-core

});
if (!originatorCache.getAdvancedCache().getDistributionManager().getCacheTopology().isReadOwner(key)) {
  controlledRpcManager.expectCommand(ClusteredGetCommand.class).send().receiveAll();
origin: org.infinispan/infinispan-core

assertTrue(dm0.getCacheTopology().isReadOwner(k1));
assertTrue(dm0.getCacheTopology().isReadOwner(k2));
assertEquals("v1", cache(0).get(k1));
assertEquals("v2", cache(0).get(k2));
origin: org.infinispan/infinispan-core

});
if (!originatorCache.getAdvancedCache().getDistributionManager().getCacheTopology().isReadOwner(key)) {
  controlledRpcManager.expectCommand(ClusteredGetCommand.class).send().receiveAll();
org.infinispan.distributionLocalizedCacheTopologyisReadOwner

Popular methods of LocalizedCacheTopology

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

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • onRequestPermissionsResult (Fragment)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • BoxLayout (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best plugins for Eclipse
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