@Test public void testClearCacheDisablesNonStop() throws Exception { repositoryService.clearCache("testCacheManager", "testCache1"); verify(clusteredInstanceFactory, times(2)).enableNonStopForCurrentThread(anyBoolean()); }
@Override public void clearCache(String cacheManagerName, String cacheName) { cacheManagerSamplerRepoLock.readLock().lock(); SamplerRepoEntry entry = cacheManagerSamplerRepo.get(cacheManagerName); try { enableNonStopFor(entry, false); if (entry != null) { entry.clearCache(cacheName); } } finally { enableNonStopFor(entry, true); cacheManagerSamplerRepoLock.readLock().unlock(); } }
DfltSamplerRepositoryService implements ManagementServerLifecycle,
    EntityResourceFactory, CacheManagerService, CacheService, AgentService { @Override public void clearCache(String cacheManagerName, String cacheName) { cacheManagerSamplerRepoLock.readLock().lock(); SamplerRepoEntry entry = cacheManagerSamplerRepo.get(cacheManagerName); try { enableNonStopFor(entry, false); if (entry != null) { entry.clearCache(cacheName); } } finally { enableNonStopFor(entry, true); cacheManagerSamplerRepoLock.readLock().unlock(); } } }
DfltSamplerRepositoryService implements ManagementServerLifecycle,
    EntityResourceFactory, CacheManagerService, CacheService, AgentService { @Override public void clearCache(String cacheManagerName, String cacheName) { cacheManagerSamplerRepoLock.readLock().lock(); SamplerRepoEntry entry = cacheManagerSamplerRepo.get(cacheManagerName); try { enableNonStopFor(entry, false); if (entry != null) { entry.clearCache(cacheName); } } finally { enableNonStopFor(entry, true); cacheManagerSamplerRepoLock.readLock().unlock(); } } DfltSamplerRepositoryService(ManagementRESTServiceConfiguration configuration,
      RemoteAgentEndpointImpl remoteAgentEndpoint); }
DfltSamplerRepositoryService implements ManagementServerLifecycle,
    EntityResourceFactory, CacheManagerService, CacheService, AgentService { @Override public void clearCache(String cacheManagerName, String cacheName) { cacheManagerSamplerRepoLock.readLock().lock(); SamplerRepoEntry entry = cacheManagerSamplerRepo.get(cacheManagerName); try { enableNonStopFor(entry, false); if (entry != null) { entry.clearCache(cacheName); } } finally { enableNonStopFor(entry, true); cacheManagerSamplerRepoLock.readLock().unlock(); } } DfltSamplerRepositoryService(ManagementRESTServiceConfiguration configuration,
      RemoteAgentEndpointImpl remoteAgentEndpoint); @Override void dispose(); @Override void register(CacheManager cacheManager); @Override void unregister(CacheManager cacheManager); @Override boolean hasRegistered(); @Override Collection<CacheManagerEntity> createCacheManagerEntities(Set<String> cacheManagerNames,
      Set<String> attributes); @Override Collection<CacheManagerConfigEntity> createCacheManagerConfigEntities(Set<String> cacheManagerNames); @Override Collection<CacheEntity> createCacheEntities(Set<String> cacheManagerNames,
      Set<String> cacheNames,
      Set<String> attributes); @Override Collection<CacheConfigEntity> createCacheConfigEntities(Set<String> cacheManagerNames,
      Set<String> cacheNames); @Override Collection<CacheStatisticSampleEntity> createCacheStatisticSampleEntity(Set<String> cacheManagerNames,
      Set<String> cacheNames,
      Set<String> sampleNames); @Override void createOrUpdateCache(String cacheManagerName,
      String cacheName,
      CacheEntity resource); @Override void clearCache(String cacheManagerName,
      String cacheName); @Override void updateCacheManager(String cacheManagerName,
      CacheManagerEntity resource); @Override Collection<QueryResultsEntity> executeQuery(String cacheManagerName, String queryString); @Override Collection<AgentEntity> getAgents(Set<String> ids); @Override Collection<AgentMetadataEntity> getAgentsMetadata(Set<String> ids); }
DfltSamplerRepositoryService implements ManagementServerLifecycle,
    EntityResourceFactory, CacheManagerService, CacheService, AgentService { @Override public void clearCache(String cacheManagerName, String cacheName) { cacheManagerSamplerRepoLock.readLock().lock(); SamplerRepoEntry entry = cacheManagerSamplerRepo.get(cacheManagerName); try { enableNonStopFor(entry, false); if (entry != null) { entry.clearCache(cacheName); } } finally { enableNonStopFor(entry, true); cacheManagerSamplerRepoLock.readLock().unlock(); } } DfltSamplerRepositoryService(ManagementRESTServiceConfiguration configuration,
      RemoteAgentEndpointImpl remoteAgentEndpoint); @Override void dispose(); @Override void register(CacheManager cacheManager); @Override void unregister(CacheManager cacheManager); @Override boolean hasRegistered(); @Override Collection<CacheManagerEntity> createCacheManagerEntities(Set<String> cacheManagerNames,
      Set<String> attributes); @Override Collection<CacheManagerConfigEntity> createCacheManagerConfigEntities(Set<String> cacheManagerNames); @Override Collection<CacheEntity> createCacheEntities(Set<String> cacheManagerNames,
      Set<String> cacheNames,
      Set<String> attributes); @Override Collection<CacheConfigEntity> createCacheConfigEntities(Set<String> cacheManagerNames,
      Set<String> cacheNames); @Override Collection<CacheStatisticSampleEntity> createCacheStatisticSampleEntity(Set<String> cacheManagerNames,
      Set<String> cacheNames,
      Set<String> sampleNames); @Override void createOrUpdateCache(String cacheManagerName,
      String cacheName,
      CacheEntity resource); @Override void clearCache(String cacheManagerName,
      String cacheName); @Override void updateCacheManager(String cacheManagerName,
      CacheManagerEntity resource); @Override Collection<QueryResultsEntity> executeQuery(String cacheManagerName, String queryString); @Override Collection<AgentEntity> getAgents(Set<String> ids); @Override Collection<AgentMetadataEntity> getAgentsMetadata(Set<String> ids); static final String AGENCY; }