Package com.mackenziehigh.cascade
Interface Cascade
public interface Cascade
Micro Actor Framework.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Partial Implementation ofStage
.static final class
AMailbox
implementation based on aArrayBlockingQueue
.static final class
AMailbox
implementation based on aArrayDeque
.static final class
AMailbox
implementation based on anArrayDeque
, which behaves like a ring-buffer data-structure.static final class
AMailbox
implementation based on aConcurrentLinkedQueue
.static final class
AMailbox
implementation based on aLinkedBlockingQueue
.static final class
AMailbox
implementation based on aPriorityBlockingQueue
.static interface
A group ofActor
s with a common power supply. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic Cascade.Stage
newStage()
Create a new single-threaded stage.static Cascade.Stage
newStage
(int threadCount) Create a new multi-threaded stage.static Cascade.Stage
newStage
(int threadCount, boolean daemon) Create a new multi-threaded stage.static Cascade.Stage
newStage
(ExecutorService service) Create a new stage based on a givenExecutorService
.
-
Method Details
-
newStage
Create a new single-threaded stage.The stage will use a non-daemon thread.
- Returns:
- the new stage.
-
newStage
Create a new multi-threaded stage.The stage will use non-daemon threads.
- Parameters:
threadCount
- is the number of worker threads that the stage will use.- Returns:
- the new stage.
-
newStage
Create a new multi-threaded stage.- Parameters:
threadCount
- is the number of worker threads that the stage will use.daemon
- is true, if the threads will be daemon threads.- Returns:
- the new stage.
-
newStage
Create a new stage based on a givenExecutorService
.- Parameters:
service
- will power the new stage.- Returns:
- the new stage.
-