Copyright | MIT |
---|---|
Maintainer | max.voit+hdv@with-eyes.net |
Portability | non-portable (uses GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
The Master part of the Centered replication backend for acid state.
- openMasterState :: (IsAcidic st, Typeable st) => String -> PortNumber -> st -> IO (AcidState st)
- openMasterStateFrom :: (IsAcidic st, Typeable st) => FilePath -> String -> PortNumber -> st -> IO (AcidState st)
- openRedMasterState :: (IsAcidic st, Typeable st) => String -> PortNumber -> Int -> st -> IO (AcidState st)
- openRedMasterStateFrom :: (IsAcidic st, Typeable st) => FilePath -> String -> PortNumber -> Int -> st -> IO (AcidState st)
- createArchiveGlobally :: (IsAcidic st, Typeable st) => AcidState st -> IO ()
- data MasterState st = MasterState {
- localState :: AcidState st
- nodeStatus :: MVar NodeStatus
- repRedundancy :: Int
- repFinalizers :: MVar (IntMap (IO ()))
- masterStateLock :: MVar ()
- masterRevision :: MVar NodeRevision
- masterRevisionN :: MVar NodeRevision
- masterReplicationChan :: Chan ReplicationItem
- masterReplicationChanN :: Chan ReplicationItem
- masterReqThreadId :: MVar ThreadId
- masterRepLThreadId :: MVar ThreadId
- masterRepNThreadId :: MVar ThreadId
- masterParentThreadId :: ThreadId
- zmqContext :: Context
- zmqAddr :: String
- zmqSocket :: MVar (Socket Router)
Documentation
:: (IsAcidic st, Typeable st) | |
=> String | address to bind (useful to listen on specific interfaces only) |
-> PortNumber | port to bind to |
-> st | initial state |
-> IO (AcidState st) |
Open the Master state.
The directory for the local state files is the default one ("state[typeOf state]").
:: (IsAcidic st, Typeable st) | |
=> FilePath | location of the local state files |
-> String | address to bind (useful to listen on specific interfaces only) |
-> PortNumber | port to bind to |
-> st | initial state |
-> IO (AcidState st) |
Open the master state from a specific location.
:: (IsAcidic st, Typeable st) | |
=> String | address to bind (useful to listen on specific interfaces only) |
-> PortNumber | port to bind to |
-> Int | guarantee n-redundant replication |
-> st | initial state |
-> IO (AcidState st) |
Open the master state with n-redundant replication.
The directory for the local state files is the default one ("state/[typeOf state]/").
:: (IsAcidic st, Typeable st) | |
=> FilePath | location of the local state files |
-> String | address to bind (useful to listen on specific interfaces only) |
-> PortNumber | port to bind to |
-> Int | guarantee n-redundant replication |
-> st | initial state |
-> IO (AcidState st) |
Open the master state from a specific location with redundant replication.
createArchiveGlobally :: (IsAcidic st, Typeable st) => AcidState st -> IO () Source
Create an archive on all nodes. Usually createArchive (local to each node) is appropriate. Also take care: Nodes that are not connected at the time, will not create an archive (on reconnect).
data MasterState st Source
Master state structure, for internal use.
MasterState | |
|