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

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

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

origin: org.infinispan/infinispan-core

  private int currentTopologyId(Cache cache) {
   return TestingUtil.extractComponent(cache, DistributionManager.class).getCacheTopology().getTopologyId();
  }
}
origin: org.infinispan/infinispan-core

private int currentTopologyId(Cache cache) {
 return cache.getAdvancedCache().getDistributionManager().getCacheTopology().getTopologyId();
}
origin: org.infinispan/infinispan-core

private int currentTopologyId(Cache cache) {
 return cache.getAdvancedCache().getDistributionManager().getCacheTopology().getTopologyId();
}
origin: org.infinispan/infinispan-core

 @Override
 public Object visitGetCacheEntryCommand(InvocationContext ctx, GetCacheEntryCommand command) throws Throwable {
   assertNotNull(stateTransferLock);
   log.tracef("Waiting for topology %d before executing %s", expectedTopologyId, command);
   CompletableFuture<Void> topologyFuture = stateTransferLock.topologyFuture(expectedTopologyId);
   if (topologyFuture != null) {
    topologyFuture.get(10, TimeUnit.SECONDS);
   }
   assertEquals(expectedTopologyId, distributionManager.getCacheTopology().getTopologyId());
   return invokeNext(ctx, command);
 }
}
origin: org.infinispan/infinispan-core

public void testMinViewId1() throws Exception {
 final TransactionTable tt0 = TestingUtil.getTransactionTable(cache(0));
 final TransactionTable tt1 = TestingUtil.getTransactionTable(cache(1));
 DistributionManager distributionManager0 = advancedCache(0).getDistributionManager();
 final int topologyId = distributionManager0.getCacheTopology().getTopologyId();
 assertEquals(tt0.getMinTopologyId(), topologyId);
 assertEquals(tt1.getMinTopologyId(), topologyId);
 //add a new cache and check that min view is updated
 log.trace("Adding new node ..");
 addClusterEnabledCacheManager(c);
 waitForClusterToForm();
 log.trace("New node added.");
 final int topologyId2 = distributionManager0.getCacheTopology().getTopologyId();
 assertTrue(topologyId2 > topologyId);
 final TransactionTable tt2 = TestingUtil.getTransactionTable(cache(2));
 eventually(() -> tt0.getMinTopologyId() == topologyId2
    && tt1.getMinTopologyId() == topologyId2
    && tt2.getMinTopologyId() == topologyId2);
}
origin: org.infinispan/infinispan-hibernate-cache-commons

int currentTopologyId = cacheTopology.getTopologyId();
if (commandTopologyId != -1 && currentTopologyId != commandTopologyId) {
  throw OutdatedTopologyException.RETRY_NEXT_TOPOLOGY;
origin: org.infinispan/infinispan-core

public void testNodeJoin() throws Exception {
 List<MagicKey> keys = init();
 EmbeddedCacheManager cm4 = addClusterEnabledCacheManager(defaultConfig, TRANSPORT_FLAGS);
 int startTopologyId = c1.getAdvancedCache().getDistributionManager().getCacheTopology().getTopologyId();
origin: org.infinispan/infinispan-core

final int topologyId = distributionManager0.getCacheTopology().getTopologyId();
log.trace("New node added.");
final int topologyId2 = distributionManager0.getCacheTopology().getTopologyId();
assertTrue(topologyId2 > topologyId);
origin: org.infinispan/infinispan-core

BlockingClusterTopologyManager bctm = BlockingClusterTopologyManager.replace(c.getCacheManager());
BlockingClusterTopologyManager.Handle<CacheTopology> handle = bctm.startBlockingTopologyUpdate(topology -> true);
int currentTopology = cr.getDistributionManager().getCacheTopology().getTopologyId();
cleanup.add(handle::stopBlocking);
origin: org.infinispan/infinispan-core

int initialTopologyId = dm0.getCacheTopology().getTopologyId();
int rebalanceTopologyId = initialTopologyId + 1;
AdvancedCache<Object, Object> cache1 = advancedCache(1, CACHE_NAME);
origin: org.infinispan/infinispan-core

  private Future<Void> simulateTopologyUpdate(Cache<Object, Object> cache) {
   StateTransferLock stl4 = TestingUtil.extractComponent(cache, StateTransferLock.class);
   DistributionManager dm4 = cache.getAdvancedCache().getDistributionManager();
   LocalizedCacheTopology cacheTopology = dm4.getCacheTopology();
   int newTopologyId = cacheTopology.getTopologyId() + 1;
   CacheTopology newTopology = new CacheTopology(newTopologyId, cacheTopology.getRebalanceId(),
                          cacheTopology.getCurrentCH(), cacheTopology.getPendingCH(),
                          cacheTopology.getUnionCH(),
                          cacheTopology.getPhase(), cacheTopology.getActualMembers(),
                          cacheTopology.getMembersPersistentUUIDs());
   dm4.setCacheTopology(newTopology);
   return fork(() -> stl4.notifyTransactionDataReceived(newTopologyId));
  }
}
origin: org.infinispan/infinispan-core

int preJoinTopologyId = cache0.getDistributionManager().getCacheTopology().getTopologyId();
origin: org.infinispan/infinispan-core

int currentTopologyId = primaryOwnerCache.getAdvancedCache().getDistributionManager().getCacheTopology().getTopologyId();
Future<Object> secondCommitFuture = fork(() -> {
origin: org.infinispan/infinispan-server-hotrod

public void testNewTopologySentAfterCleanMerge() {
 TestingUtil.waitForNoRebalanceAcrossManagers(managers());
 int initialTopology = advancedCache(0).getRpcManager().getTopologyId();
 expectCompleteTopology(client, initialTopology);
 PartitionDescriptor p0 = new PartitionDescriptor(0);
 PartitionDescriptor p1 = new PartitionDescriptor(1);
 splitCluster(p0.getNodes(), p1.getNodes());
 eventuallyEquals(1, () -> advancedCache(0).getDistributionManager().getCacheTopology().getActualMembers().size());
 eventuallyEquals(1, () -> advancedCache(1).getDistributionManager().getCacheTopology().getActualMembers().size());
 expectPartialTopology(client, initialTopology + 1);
 partition(0).merge(partition(1));
 int finalTopologyId =  initialTopology + (partitionHandling == PartitionHandling.DENY_READ_WRITES ? 4 : 8);
 eventuallyExpectCompleteTopology(client, finalTopologyId);
 // Check that we got the number of topology updates to NO_REBALANCE right
 // With DENY_READ_WRITES:
 // T+1: DEGRADED_MODE in both partitions
 // T+3: merged, still DEGRADED_MODE
 // T+4: back to AVAILABLE
 // With ALLOW_READ_WRITES:
 // T+2: NO_REBALANCE in partition [B] before merge
 // T+3: CONFLICT_RESOLUTION, preferred CH: owners = (1) [test-NodeA-22368: 256+0]
 // T+4: NO_REBALANCE update topology after CR and before rebalance begins
 // T+5:READ_OLD (rebalance starts), T+6:READ_ALL, T+7:READ_NEW, T+8: NO_REBALANCE
 LocalizedCacheTopology newTopology = advancedCache(0).getDistributionManager().getCacheTopology();
 assertEquals(CacheTopology.Phase.NO_REBALANCE, newTopology.getPhase());
 assertEquals(finalTopologyId, newTopology.getTopologyId());
}
origin: org.infinispan/infinispan-core

DistributionManager dm0 = cache0.getDistributionManager();
int initialTopologyId = dm0.getCacheTopology().getTopologyId();
int rebalanceTopologyId = initialTopologyId + 1;
final int finalTopologyId = rebalanceTopologyId + 3;
assertEquals(rebalanceTopologyId, dm0.getCacheTopology().getTopologyId());
assertEquals(finalTopologyId, dm0.getCacheTopology().getTopologyId());
origin: org.infinispan/infinispan-core

final int initialTopologyId = dm0.getCacheTopology().getTopologyId();
origin: org.infinispan/infinispan-core

checkPoint.trigger("allow_topology_" + postJoinTopologyId + "_on_" + address(0));
eventuallyEquals(postJoinTopologyId,
   () -> cache0.getDistributionManager().getCacheTopology().getTopologyId());
origin: org.infinispan/infinispan-core

final Cache<Object, Object> c1 = cm1.getCache();
DelayInterceptor di1 = findInterceptor(c1, DelayInterceptor.class);
int initialTopologyId = c1.getAdvancedCache().getDistributionManager().getCacheTopology().getTopologyId();
origin: org.infinispan/infinispan-core

final Cache<Object, Object> c1 = cm1.getCache();
DelayInterceptor di1 = findInterceptor(c1, DelayInterceptor.class);
int initialTopologyId = c1.getAdvancedCache().getDistributionManager().getCacheTopology().getTopologyId();
origin: org.infinispan/infinispan-core

final Cache<Object, Object> c1 = cm1.getCache();
DelayInterceptor di1 = findInterceptor(c1, DelayInterceptor.class);
int initialTopologyId = c1.getAdvancedCache().getDistributionManager().getCacheTopology().getTopologyId();
org.infinispan.distributionLocalizedCacheTopologygetTopologyId

Popular methods of LocalizedCacheTopology

  • getDistribution
  • getSegment
  • <init>
  • getActualMembers
  • getCurrentCH
  • getMembers
  • getPhase
  • isReadOwner
  • 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 IntelliJ plugins
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