Copyright | Copyright (c) 2015-2017 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Tested with: GHC 7.10.3
This module allows running the time server that coordinates the global simulation time.
Synopsis
- data TimeServerParams = TimeServerParams {
- tsLoggingPriority :: Priority
- tsName :: String
- tsReceiveTimeout :: Int
- tsTimeSyncTimeout :: Int
- tsTimeSyncDelay :: Int
- tsProcessMonitoringEnabled :: Bool
- tsProcessMonitoringDelay :: Int
- tsProcessReconnectingEnabled :: Bool
- tsProcessReconnectingDelay :: Int
- tsSimulationMonitoringInterval :: Int
- tsSimulationMonitoringTimeout :: Int
- tsStrategy :: TimeServerStrategy
- data TimeServerEnv = TimeServerEnv {
- tsSimulationMonitoringAction :: Maybe (TimeServerState -> Process ())
- data TimeServerStrategy
- defaultTimeServerParams :: TimeServerParams
- defaultTimeServerEnv :: TimeServerEnv
- timeServer :: Int -> TimeServerParams -> Process ()
- timeServerWithEnv :: Int -> TimeServerParams -> TimeServerEnv -> Process ()
- curryTimeServer :: (Int, TimeServerParams) -> Process ()
Documentation
data TimeServerParams Source #
The time server parameters.
TimeServerParams | |
|
Instances
data TimeServerEnv Source #
Those time server environment parameters that cannot be serialized and passed to another process via the net.
TimeServerEnv | |
|
data TimeServerStrategy Source #
The time server strategy.
WaitIndefinitelyForLogicalProcess | wait for the logical processes forever |
TerminateDueToLogicalProcessTimeout Int | terminate the server due to the exceeded logical process timeout in microseconds,
but not less than |
UnregisterLogicalProcessDueToTimeout Int | unregister the logical process due to the exceeded timeout in microseconds,
but not less than |
Instances
defaultTimeServerParams :: TimeServerParams Source #
The default time server parameters.
defaultTimeServerEnv :: TimeServerEnv Source #
The default time server environment parameters.
timeServer :: Int -> TimeServerParams -> Process () Source #
Start the time server by the specified initial quorum and parameters. The quorum defines the number of logical processes that must be registered in the time server before the global time synchronization is started.
timeServerWithEnv :: Int -> TimeServerParams -> TimeServerEnv -> Process () Source #
A full version of timeServer
that allows specifying the environment parameters.
curryTimeServer :: (Int, TimeServerParams) -> Process () Source #
A curried version of timeServer
for starting the time server on remote node.