@Test public void testRetrieveLoadBalancers() throws Exception { TestData data = generateTestData(10, 20, 1); loadTestData(data); CassandraLoadBalancerStore store = getInitdStore(); checkDataSetExists(store, data.getAssociations()); }
@Override public List<JobLoadBalancerState> getAssociations() { return loadBalancerStateMap.entrySet().stream() .map(JobLoadBalancerState::from) .collect(Collectors.toList()); }
CassandraLoadBalancerStore implements LoadBalancerStore { @Override public List<JobLoadBalancerState> getAssociations() { return loadBalancerStateMap.entrySet().stream() .map(JobLoadBalancerState::from) .collect(Collectors.toList()); } }
CassandraLoadBalancerStore implements LoadBalancerStore { @Override public List<JobLoadBalancerState> getAssociations() { return loadBalancerStateMap.entrySet().stream() .map(JobLoadBalancerState::from) .collect(Collectors.toList()); } @Inject  CassandraLoadBalancerStore(CassandraStoreConfiguration configuration,
                                      @Named(LOAD_BALANCER_SANITIZER) EntitySanitizer entitySanitizer,
                                      @Named(LOAD_BALANCER_CASSANDRA_SESSION) Session session); }
CassandraLoadBalancerStore implements LoadBalancerStore { @Override public List<JobLoadBalancerState> getAssociations() { return loadBalancerStateMap.entrySet().stream() .map(JobLoadBalancerState::from) .collect(Collectors.toList()); } @Inject  CassandraLoadBalancerStore(CassandraStoreConfiguration configuration,
                                      @Named(LOAD_BALANCER_SANITIZER) EntitySanitizer entitySanitizer,
                                      @Named(LOAD_BALANCER_CASSANDRA_SESSION) Session session); @Activator void init(); @Override Observable<JobLoadBalancer> getAssociatedLoadBalancersForJob(String jobId); @Override Set<JobLoadBalancer> getAssociatedLoadBalancersSetForJob(String jobId); @Override List<JobLoadBalancerState> getAssociations(); @Override List<JobLoadBalancer> getAssociationsPage(int offset, int limit); @Override Completable addOrUpdateLoadBalancer(JobLoadBalancer jobLoadBalancer, JobLoadBalancer.State state); @Override Completable removeLoadBalancer(JobLoadBalancer jobLoadBalancer); @Override int getNumLoadBalancersForJob(String jobId); @Override Mono<Void> addOrUpdateTargets(Collection<LoadBalancerTargetState> targets); @Override Mono<Void> removeDeregisteredTargets(Collection<LoadBalancerTarget> toRemove); @Override Flux<LoadBalancerTargetState> getLoadBalancerTargets(String loadBalancerId); }
CassandraLoadBalancerStore implements LoadBalancerStore { @Override public List<JobLoadBalancerState> getAssociations() { return loadBalancerStateMap.entrySet().stream() .map(JobLoadBalancerState::from) .collect(Collectors.toList()); } @Inject  CassandraLoadBalancerStore(CassandraStoreConfiguration configuration,
                                      @Named(LOAD_BALANCER_SANITIZER) EntitySanitizer entitySanitizer,
                                      @Named(LOAD_BALANCER_CASSANDRA_SESSION) Session session); @Activator void init(); @Override Observable<JobLoadBalancer> getAssociatedLoadBalancersForJob(String jobId); @Override Set<JobLoadBalancer> getAssociatedLoadBalancersSetForJob(String jobId); @Override List<JobLoadBalancerState> getAssociations(); @Override List<JobLoadBalancer> getAssociationsPage(int offset, int limit); @Override Completable addOrUpdateLoadBalancer(JobLoadBalancer jobLoadBalancer, JobLoadBalancer.State state); @Override Completable removeLoadBalancer(JobLoadBalancer jobLoadBalancer); @Override int getNumLoadBalancersForJob(String jobId); @Override Mono<Void> addOrUpdateTargets(Collection<LoadBalancerTargetState> targets); @Override Mono<Void> removeDeregisteredTargets(Collection<LoadBalancerTarget> toRemove); @Override Flux<LoadBalancerTargetState> getLoadBalancerTargets(String loadBalancerId); static final String LOAD_BALANCER_CASSANDRA_SESSION; }