# Module tx_tm

- Description
- Data Types
- Function Index
- Function Details

Transaction validation based on a sequence of Paxos round based registers (kv_on_cseq).

Copyright © 2012-2015 Zuse Institute Berlin,

Version: $Id:$

Behaviours: `gen_component`.

Authors: Florian Schintke (`schintke@zib.de`).

## Description

Transaction validation based on a sequence of Paxos round based registers (kv_on_cseq).

## Data Types

### client_key()

    client_key() = [unicode_char()]

### state()

    state() =
        {TableName :: pdb:tableid(),
         Id :: rt_chord:key(),
         OpenTxNum :: non_neg_integer()}

### tx_id()

    tx_id() = rt_chord:key()

was {?tx_id, uid:global_uid()}.

### unicode_char()

    unicode_char() = 0..55295 | 57344..65533 | 65536..1114111

## Function Index

check_config/0 | Checks whether config parameters for tx_tm exist and are valid.
commit/4 |
init/1 |
is_txnew_enabled/0 |
msg_commit_reply/3 |
on/2 |
on_init/2 |
redecide/1 | takes care of a transaction with the given transaction id.
redecide_on_key/1 |
rm_send_update/5 | Notifies the tx_tm of a changed node ID.
start_gen_component/5 |
start_link/2 |

## Function Details

### start_gen_component/5

    start_gen_component(Module :: module(),
                        Handler :: gen_component:handler(),
                        Args :: term(),
                        Options :: [gen_component:option()],
                        Self :: pid()) ->
                           no_return() | ok

### commit/4

    commit(TM :: comm:erl_local_pid(),
           Client :: comm:mypid(),
           ClientsID :: any(),
           TLog :: tx_tlog:tlog()) ->
              ok

### msg_commit_reply/3

    msg_commit_reply(Client :: comm:mypid(),
                     ClientsID :: any(),
                     Result ::
                         commit | {abort, [client_key() | binary]}) ->
                        ok

### redecide/1

    redecide(TxId :: tx_id()) -> ok

takes care of a transaction with the given transaction id.

### redecide_on_key/1

    redecide_on_key(Key :: rt_chord:key()) -> ok

### is_txnew_enabled/0

    is_txnew_enabled() -> boolean()

### rm_send_update/5

    rm_send_update(Subscriber :: pid(),
                   Tag :: tx_tm,
                   OldNeighbors :: nodelist:neighborhood(),
                   NewNeighbors :: nodelist:neighborhood(),
                   Reason :: rm_loop:reason()) ->
                      ok

Notifies the tx_tm of a changed node ID.

### start_link/2

    start_link(DHTNodeGroup :: pid_groups:groupname(), X2 :: any()) ->
                  {ok, pid()}

### init/1

    init(X1 :: []) ->
            state() |
            {'$gen_component',
             [{on_handler, gen_component:handler()}, ...],
             state()}

### on/2

    on(X1 :: comm:message(), State :: state()) -> state()

### on_init/2

    on_init(Msg :: comm:message(), State :: state()) ->
               state() |
               {'$gen_component',
                [{on_handler, Handler :: gen_component:handler()}],
                State :: state()}

### check_config/0

    check_config() -> boolean()

Checks whether config parameters for tx_tm exist and are valid.

Generated by EDoc, Apr 22 2017, 15:58:18.