# Module cloudi_service_map_reduce

- Description
- Data Types
- Function Index
- Function Details

### CloudI (Abstract) Map-Reduce Service

This module provides an Erlang behaviour for fault-tolerant, database agnostic map-reduce.

Copyright © 2012-2020 Michael Truog

Version: 1.8.1 Jun 3 2020 20:56:25 ------------------------------------------------------------------------

Behaviours: `cloudi_service`.

This module defines the `cloudi_service_map_reduce` behaviour.
Required callback functions: `cloudi_service_map_reduce_new/5`, `cloudi_service_map_reduce_send/2`, `cloudi_service_map_reduce_resend/2`, `cloudi_service_map_reduce_recv/7`, `cloudi_service_map_reduce_info/3`.

Authors: Michael Truog (`mjtruog at protonmail dot com`).

## Description

### CloudI (Abstract) Map-Reduce Service

This module provides an Erlang behaviour for fault-tolerant, database agnostic map-reduce. See the hexpi test for example usage.

## Data Types

### agent()

`agent() = cloudi:agent()`

### map_send_args()

`map_send_args() = nonempty_list()`

### module_response()

`module_response(Result) = {{ok, Result}, AgentNew::agent()} | {{error, cloudi:error_reason()}, AgentNew::agent()}`

### service_name()

`service_name() = cloudi:service_name()`

### timeout_milliseconds()

`timeout_milliseconds() = cloudi:timeout_milliseconds()`

## Function Index

cloudi_service_handle_info/3 |
cloudi_service_handle_request/11 |
cloudi_service_init/4 |
cloudi_service_terminate/3 |
resume/2 |
resume/3 |
suspend/2 |
suspend/3 |

## Function Details

### cloudi_service_handle_info/3

`cloudi_service_handle_info(Init_begin, State, Dispatcher) -> any()`

### cloudi_service_handle_request/11

`cloudi_service_handle_request(RequestType, Name, Pattern, RequestInfo, Request, Timeout, Priority, TransId, Pid, State, Dispatcher) -> any()`

### cloudi_service_init/4

`cloudi_service_init(Args, Prefix, Timeout, Dispatcher) -> any()`

### cloudi_service_terminate/3

`cloudi_service_terminate(Reason, Timeout, State) -> any()`

### resume/2

`resume(Agent::agent(), Prefix::service_name()) -> module_response(ok | {error, any()})`

### resume/3

`resume(Agent::agent(), Prefix::service_name(), Timeout::timeout_milliseconds()) -> module_response(ok | {error, any()})`

### suspend/2

`suspend(Agent::agent(), Prefix::service_name()) -> module_response(ok | {error, any()})`

### suspend/3

`suspend(Agent::agent(), Prefix::service_name(), Timeout::timeout_milliseconds()) -> module_response(ok | {error, any()})`

Generated by EDoc