io.vlingo.actors.RouterSpecification Java Examples

The following examples show how to use io.vlingo.actors.RouterSpecification. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LoadBalancingCommandRouter.java    From vlingo-lattice with Mozilla Public License 2.0 5 votes vote down vote up
/**
 * Constructs my default state.
 * @param totalRoutees the int number or routees to create
 */
public LoadBalancingCommandRouter(final int totalRoutees) {
  super(new RouterSpecification<CommandRouter>(
          totalRoutees,
          Definition.has(CommandRouterWorkerActor.class, Definition.NoParameters),
          CommandRouter.class));
}
 
Example #2
Source File: PartitioningCommandRouter.java    From vlingo-lattice with Mozilla Public License 2.0 5 votes vote down vote up
/**
 * Constructs my default state.
 * @param totalRoutees the int number or routees to create
 */
public PartitioningCommandRouter(final int totalRoutees) {
  super(new RouterSpecification<CommandRouter>(
          totalRoutees,
          Definition.has(CommandRouterWorkerActor.class, Definition.NoParameters),
          CommandRouter.class));

  this.totalRoutees = totalRoutees;
}
 
Example #3
Source File: RoundRobinCommandRouter.java    From vlingo-lattice with Mozilla Public License 2.0 5 votes vote down vote up
/**
 * Constructs my default state.
 * @param totalRoutees the int number or routees to create
 */
public RoundRobinCommandRouter(final int totalRoutees) {
  super(new RouterSpecification<CommandRouter>(
          totalRoutees,
          Definition.has(CommandRouterWorkerActor.class, Definition.NoParameters),
          CommandRouter.class));
}
 
Example #4
Source File: WorkRouterActor.java    From vlingo-examples with Mozilla Public License 2.0 5 votes vote down vote up
public WorkRouterActor(final int poolSize, final CompetingConsumerResults results) {
  super(
          new RouterSpecification<WorkConsumer>(
            poolSize,
            Definition.has(WorkConsumerActor.class, Definition.parameters(results)),
            WorkConsumer.class
          )
        );
}
 
Example #5
Source File: ClientConsumer.java    From vlingo-http with Mozilla Public License 2.0 4 votes vote down vote up
public LoadBalancingClientRequestConsumerInstantiator(final Configuration configuration, final RouterSpecification<ClientConsumer> spec) {
  this.configuration = configuration;
  this.spec = spec;
}
 
Example #6
Source File: ClientConsumer.java    From vlingo-http with Mozilla Public License 2.0 4 votes vote down vote up
public RoundRobinClientRequestConsumerInstantiator(final Configuration configuration, final RouterSpecification<ClientConsumer> spec) {
  this.configuration = configuration;
  this.spec = spec;
}
 
Example #7
Source File: LoadBalancingClientRequestConsumerActor.java    From vlingo-http with Mozilla Public License 2.0 2 votes vote down vote up
/**
 * Constructs my default state.
 * @param configuration the Configuration
 * @param specification the RouterSpecification
 * @throws Exception when the router cannot be initialized
 */
public LoadBalancingClientRequestConsumerActor(
        final Configuration configuration,
        final RouterSpecification<ClientConsumer> specification) throws Exception {
  super(specification);
}
 
Example #8
Source File: RoundRobinClientRequestConsumerActor.java    From vlingo-http with Mozilla Public License 2.0 2 votes vote down vote up
/**
 * Constructs my default state.
 * @param configuration the Configuration
 * @param specification the RouterSpecification
 * @throws Exception when the router cannot be initialized
 */
public RoundRobinClientRequestConsumerActor(
        final Configuration configuration,
        final RouterSpecification<ClientConsumer> specification) throws Exception {
  super(specification);
}