Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
com.griddynamics.jagger.invoker.CircularExclusiveAccessLoadBalancer< Q, E > Class Reference

Subclass of ExclusiveAccessLoadBalancer that circularly selects pairs of Q and E. More...

Inheritance diagram for com.griddynamics.jagger.invoker.CircularExclusiveAccessLoadBalancer< Q, E >:

Public Member Functions

 CircularExclusiveAccessLoadBalancer (PairSupplierFactory< Q, E > pairSupplierFactory)
 
void setPollTimeout (long pollTimeout)
 
- Public Member Functions inherited from com.griddynamics.jagger.invoker.ExclusiveAccessLoadBalancer< Q, E >
 ExclusiveAccessLoadBalancer (PairSupplierFactory< Q, E > pairSupplierFactory)
 
void init ()
 
Iterator< Pair< Q, E > > provide ()
 Returns an iterator over pairs. More...
 
void setRandomnessSeed (Long randomnessSeed)
 
- Public Member Functions inherited from com.griddynamics.jagger.invoker.PairSupplierFactoryLoadBalancer< Q, E >
void init ()
 
- Public Member Functions inherited from com.griddynamics.jagger.invoker.QueryPoolLoadBalancer< Q, E >
int endpointSize ()
 Returns number of endpoints. More...
 
int getIterableSize (Iterable iterable)
 
void init ()
 To be called after all dependencies are injected. More...
 
final Iterator< Pair< Q, E > > iterator ()
 
 QueryPoolLoadBalancer ()
 
 QueryPoolLoadBalancer (Iterable< Q > queryProvider, Iterable< E > endpointProvider)
 
int querySize ()
 Returns number of queries. More...
 
void setEndpointProvider (Iterable< E > endpointProvider)
 
void setKernelInfo (KernelInfo kernelInfo)
 
void setQueryProvider (Iterable< Q > queryProvider)
 

Protected Member Functions

boolean isToCircleAnIteration ()
 
Pair< Q, E > pollNext ()
 
- Protected Member Functions inherited from com.griddynamics.jagger.invoker.ExclusiveAccessLoadBalancer< Q, E >
ArrayBlockingQueue< Pair< Q, E > > getPairQueue ()
 
- Protected Member Functions inherited from com.griddynamics.jagger.invoker.PairSupplierFactoryLoadBalancer< Q, E >
PairSupplier< Q, E > getPairSupplier ()
 
 PairSupplierFactoryLoadBalancer (PairSupplierFactory< Q, E > pairSupplierFactory)
 

Additional Inherited Members

- Protected Attributes inherited from com.griddynamics.jagger.invoker.QueryPoolLoadBalancer< Q, E >
Iterable< E > endpointProvider
 
volatile boolean initialized = false
 
KernelInfo kernelInfo
 
final Object lock = new Object()
 
Iterable< Q > queryProvider
 

Detailed Description

Subclass of ExclusiveAccessLoadBalancer that circularly selects pairs of Q and E.

As a result it simulates infinite iteration over the limited sequence of pairs.
Also as a subclass of ExclusiveAccessLoadBalancer provides guarantees that each query and endpoint pair will be in exclusive access, i.e. once it is acquired by one thread it won't be acquired by any other thread (virtual user) in multi threaded environment.
If randomnessSeed is not

null

randomly shuffles the sequence of pairs from pairSupplierFactory using it.
Created by Andrey Badaev Date: 07/02/17

Definition at line 24 of file CircularExclusiveAccessLoadBalancer.java.


The documentation for this class was generated from the following file: