class DfltSamplerRepositoryService extends AbstractRemoteAgentEndpointImpl implements SamplerRepositoryService, EntityResourceFactory, CacheManagerService, CacheService, AgentService,
    DfltSamplerRepositoryServiceMBean {

  @Override
  public Collection<CacheStatisticSampleEntity> createCacheStatisticSampleEntity(Set<String> cacheManagerNames,
                                                                                 Set<String> cacheNames,
                                                                                 Set<String> sampleNames) {
    CacheStatisticSampleEntityBuilder builder = CacheStatisticSampleEntityBuilder.createWith(sampleNames);

    cacheManagerSamplerRepoLock.readLock().lock();

    List<SamplerRepoEntry> disabledSamplerRepoEntries = new ArrayList<SamplerRepoEntry>();

    try {
      if (cacheManagerNames == null) {
        for (Map.Entry<String, SamplerRepoEntry> entry : cacheManagerSamplerRepo.entrySet()) {
          enableNonStopFor(entry.getValue(), false);
          disabledSamplerRepoEntries.add(entry.getValue());
          for (CacheSampler sampler : entry.getValue().getComprehensiveCacheSamplers(cacheNames)) {
            builder.add(sampler, entry.getKey());
          }
        }
      } else {
        for (String cmName : cacheManagerNames) {
          SamplerRepoEntry entry = cacheManagerSamplerRepo.get(cmName);
          if (entry != null) {
            enableNonStopFor(entry, false);
            disabledSamplerRepoEntries.add(entry);
            for (CacheSampler sampler : entry.getComprehensiveCacheSamplers(cacheNames)) {
              builder.add(sampler, cmName);
            }
          }
        }
      }

      return builder.build();
    } finally {
      for (SamplerRepoEntry samplerRepoEntry : disabledSamplerRepoEntries) {
        enableNonStopFor(samplerRepoEntry, true);
      }
      cacheManagerSamplerRepoLock.readLock().unlock();
    }
  }

  public  DfltSamplerRepositoryService(String clientUUID, ManagementRESTServiceConfiguration configuration);

}