paxel.lintstone.api.ActorSettings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lintstone-java8 Show documentation
Show all versions of lintstone-java8 Show documentation
Lightweight Actor Framework
The newest version!
package paxel.lintstone.api;
import paxel.bulkexecutor.ErrorHandler;
/**
* The actor settings for the creation of configured actors.
*/
public interface ActorSettings {
/**
* Non-blocking, unlimited and one by one processing Settings. Save but not optimal.
*/
ActorSettings DEFAULT = ActorSettings.create().build();
/**
* The number of messages that should be processed by the actor in one batch.
*
* @return the batch size.
*/
int getBatch();
/**
* The handler for uncaught exceptions in the actor.
*
* @return the error handler.
*/
ErrorHandler getErrorHandler();
/**
* Create a builder to build an implementation of the Settings.
*
* @return a builder.
*/
static ActorSettingsBuilder create() {
return new ActorSettingsBuilder();
}
}