@Override public DistributionManager getDistributionManager() { return delegate.getDistributionManager(); }
private ThreadsMonitoring getThreadMonitorObj() { DistributionManager distributionManager = this.cache.getDistributionManager(); if (distributionManager != null) { return distributionManager.getThreadMonitoring(); } else { return null; } } }
private ThreadsMonitoring getThreadMonitorObj() { DistributionManager distributionManager = this.cache.getDistributionManager(); if (distributionManager != null) { return distributionManager.getThreadMonitoring(); } else { return null; } } }
/** * Returns a set of all the members of the distributed system excluding locators. */ @SuppressWarnings("unchecked") public static Set<DistributedMember> getAllNormalMembers(InternalCache cache) { return new HashSet<DistributedMember>( cache.getDistributionManager().getNormalDistributionManagerIds()); }
private ThreadsMonitoring getThreadMonitorObj() { DistributionManager distributionManager = this.cache.getDistributionManager(); if (distributionManager != null) { return distributionManager.getThreadMonitoring(); } else { return null; } }
private ThreadsMonitoring getThreadMonitorObj() { DistributionManager distributionManager = this.cache.getDistributionManager(); if (distributionManager != null) { return distributionManager.getThreadMonitoring(); } else { return null; } } }
private ThreadsMonitoring getThreadMonitorObj() { DistributionManager distributionManager = this.cache.getDistributionManager(); if (distributionManager != null) { return distributionManager.getThreadMonitoring(); } else { return null; } } }
private ThreadsMonitoring getThreadMonitorObj() { DistributionManager distributionManager = this.cache.getDistributionManager(); if (distributionManager != null) { return distributionManager.getThreadMonitoring(); } else { return null; } } }
private void cleanup() { cache.getDistributionManager().removeAllMembershipListener(membershipListener); currentTask.set(null); }
private DistributedMember getDistributedMember(String memberName) { Set<DistributedMember> locators = new HashSet<>( cache.getDistributionManager().getAllHostedLocatorsWithSharedConfiguration().keySet()); return locators.stream() .filter(x -> x.getId().equals(memberName)) .findFirst() .orElse(null); } }
void validateRequestingSender(InternalDistributedMember sender) { // We need to watch for pure admin members that depart. this allMembershipListener set // looks like it should receive those events. Set allIds = cache.getDistributionManager().addAllMembershipListenerAndGetAllIds(membershipListener); if (!allIds.contains(sender)) { cleanup(); throw new IllegalStateException("The member requesting a backup has already departed"); } }
public LuceneIndexForPartitionedRegion(String indexName, String regionPath, InternalCache cache) { super(indexName, regionPath, cache); this.waitingThreadPoolFromDM = cache.getDistributionManager().getWaitingThreadPool(); final String statsName = indexName + "-" + regionPath; this.fileSystemStats = new FileSystemStats(cache.getDistributedSystem(), statsName); }
@Override protected RepositoryManager createRepositoryManager(LuceneSerializer luceneSerializer) { HeterogeneousLuceneSerializer mapper = (HeterogeneousLuceneSerializer) luceneSerializer; if (mapper == null) { mapper = new HeterogeneousLuceneSerializer(); } RawLuceneRepositoryManager rawLuceneRepositoryManager = new RawLuceneRepositoryManager(this, mapper, cache.getDistributionManager().getWaitingThreadPool()); return rawLuceneRepositoryManager; }
public static DMStats getDMStats(InternalCache internalCache) { if (internalCache != null) { return internalCache.getDistributionManager().getStats(); } else { DMStats result = InternalDistributedSystem.getDMStats(); if (result == null) { result = new LonerDistributionManager.DummyDMStats(); } return result; } }
private void sendSerialMessageToAll() { if (getCache() instanceof GemFireCacheImpl) { try { org.apache.geode.distributed.internal.SerialAckedMessage msg = new org.apache.geode.distributed.internal.SerialAckedMessage(); msg.send(getCache().getDistributionManager().getNormalDistributionManagerIds(), false); } catch (Exception e) { throw new RuntimeException("Unable to send serial message due to exception", e); } } }
private void _mapClear() { Executor executor = null; InternalCache cache = this.owner.getCache(); if (cache != null) { DistributionManager manager = cache.getDistributionManager(); if (manager != null) { executor = manager.getWaitingThreadPool(); } } getCustomEntryConcurrentHashMap().clearWithExecutor(executor); }
@Before public void setUp() throws Exception { cache = mock(InternalCache.class); distributionManager = mock(DistributionManager.class); InternalDistributedSystem distributedSystem = mock(InternalDistributedSystem.class); InternalDistributedMember distributedMember = mock(InternalDistributedMember.class); when(cache.getDistributionManager()).thenReturn(distributionManager); when(distributedSystem.getDistributedMember()).thenReturn(distributedMember); when(cache.getInternalDistributedSystem()).thenReturn(distributedSystem); when(distributedMember.toString()).thenReturn("member"); when(distributionManager.addAllMembershipListenerAndGetAllIds(any())) .thenReturn(new HashSet<>(Arrays.asList(sender))); backupService = new BackupService(cache); }
@Before public void setUp() { cache = mock(InternalCache.class); when(cache.getDistributionManager()).thenReturn(mock(DistributionManager.class)); command = Mockito.spy(CreateDataSourceCommand.class); command.setCache(cache); binding = new JndiBindingsType.JndiBinding(); binding.setJndiName("name"); bindings = new ArrayList<>(); }
@Before public void setUp() throws Exception { cache = mock(InternalCache.class); when(cache.getDistributionManager()).thenReturn(mock(DistributionManager.class)); command = spy(CreateJndiBindingCommand.class); command.setCache(cache); binding = new JndiBindingsType.JndiBinding(); binding.setJndiName("name"); bindings = new ArrayList<>(); }
private TombstoneService(InternalCache cache) { this.replicatedTombstoneSweeper = new ReplicateTombstoneSweeper(cache, cache.getCachePerfStats(), cache.getCancelCriterion(), cache.getDistributionManager().getWaitingThreadPool()); this.nonReplicatedTombstoneSweeper = new NonReplicateTombstoneSweeper(cache, cache.getCachePerfStats(), cache.getCancelCriterion()); this.replicatedTombstoneSweeper.start(); this.nonReplicatedTombstoneSweeper.start(); }