class Main extends AnyRef
Basic class used to define the system.
An object that extends this class will act as a replacement for the main object, and also as a replacement for the configuration file used in original Neko. The parameters are used to create the system. This must provide the network topology (for which the number of processes is inferred), as well an initializer for the processes (see neko.ProcessInitializer).
For instance, the code below declares a system consisting of three processes, each of which is initialized by the process initializer provided:
object MyMain extends Main(topology.Clique(3))(ProcessInitializer { p=> ... })
- Alphabetic
- By Inheritance
- Main
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Main(topology: Topology, logLevel: Level = Level.ERROR, logFile: Option[String] = None, withTrace: Boolean = false)(initializer: ProcessInitializer)
- topology
network topology (see neko.topology)
- logLevel
optionally sets the log level (default is OFF)
- logFile
optionally provides a filename on which to write logs (not yet supported)
- withTrace
controls the generation of a trace of network events (send and receive)
- initializer
the initializer of processes
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Main, B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def N: Int
-
final
def
args: Array[String]
The command line arguments passed to the application's
main
method.The command line arguments passed to the application's
main
method.- Attributes
- protected
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- def ensuring(cond: (Main) ⇒ Boolean, msg: ⇒ Any): Main
- def ensuring(cond: (Main) ⇒ Boolean): Main
- def ensuring(cond: Boolean, msg: ⇒ Any): Main
- def ensuring(cond: Boolean): Main
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val logger: Logger
-
def
main(args: Array[String]): Unit
The main method.
The main method. This stores all arguments so that they can be retrieved with
args
and then executes all initialization code segments in the order in which they were passed todelayedInit
.- args
the arguments passed to the main method
- Annotations
- @deprecatedOverriding( "main should not be overridden" , "0.18.0" )
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- val topoFactory: TopologyFactory
- val topology: Topology
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (Main, B)