forked from dbernheisel/xlsxir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Xlsxir.StateManager.html
223 lines (207 loc) · 9.93 KB
/
Xlsxir.StateManager.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.19.3">
<title>Xlsxir.StateManager — Xlsxir v1.6.3</title>
<link rel="stylesheet" href="dist/html-399e30b9b028e3059575.css" />
<link rel="canonical" href="https://hexdocs.pm/xlsxir/Xlsxir.StateManager.html" />
<script src="dist/sidebar_items-ae9c76d27c.js"></script>
<script async src="dist/html-399e30b9b028e3059575.js"></script>
</head>
<body data-type="modules">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="overview.html" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
Xlsxir </h1>
<h2 class="sidebar-projectVersion">
v1.6.3
</h2>
</div>
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
<li><a id="exceptions-list" href="#full-list">Exceptions</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">Xlsxir v1.6.3</small>
Xlsxir.StateManager
<a href="https://github.com/jsonkenl/xlsxir/blob/master/lib/xlsxir/state_manager.ex#L1" title="View Source" class="view-source" rel="help">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</h1>
<section id="moduledoc">
<p>GenServer to manage ETS table state/<C-y></p>
</section>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Summary
</h1>
<div class="summary-functions summary">
<h2>
<a href="#functions">Functions</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#child_spec/1">child_spec(arg)</a>
</div>
<div class="summary-synopsis"><p>Returns a specification to start this module under a supervisor</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#init/1">init(init_arg)</a>
</div>
<div class="summary-synopsis"><p>Invoked when the server is started. <code class="inline">start_link/3</code> or <code class="inline">start/3</code> will
block until it returns</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#start_link/0">start_link()</a>
</div>
</div>
</div>
</section>
<section id="functions" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#functions">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Functions </h1>
<div class="functions-list">
<section class="detail" id="child_spec/1">
<div class="detail-header">
<a href="#child_spec/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">child_spec(arg)</span>
<a href="https://github.com/jsonkenl/xlsxir/blob/master/lib/xlsxir/state_manager.ex#L6" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Returns a specification to start this module under a supervisor.</p>
<p>See <a href="https://hexdocs.pm/elixir/Supervisor.html"><code class="inline">Supervisor</code></a>.</p>
</section>
</section>
<section class="detail" id="init/1">
<div class="detail-header">
<a href="#init/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">init(init_arg)</span>
<a href="https://github.com/jsonkenl/xlsxir/blob/master/lib/xlsxir/state_manager.ex#L12" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Invoked when the server is started. <code class="inline">start_link/3</code> or <code class="inline">start/3</code> will
block until it returns.</p>
<p><code class="inline">args</code> is the argument term (second argument) passed to <code class="inline">start_link/3</code>.</p>
<p>Returning <code class="inline">{:ok, state}</code> will cause <code class="inline">start_link/3</code> to return
<code class="inline">{:ok, pid}</code> and the process to enter its loop.</p>
<p>Returning <code class="inline">{:ok, state, timeout}</code> is similar to <code class="inline">{:ok, state}</code>
except <code class="inline">handle_info(:timeout, state)</code> will be called after <code class="inline">timeout</code>
milliseconds if no messages are received within the timeout.</p>
<p>Returning <code class="inline">{:ok, state, :hibernate}</code> is similar to <code class="inline">{:ok, state}</code>
except the process is hibernated before entering the loop. See
<code class="inline">c:handle_call/3</code> for more information on hibernation.</p>
<p>Returning <code class="inline">{:ok, state, {:continue, continue}}</code> is similar to
<code class="inline">{:ok, state}</code> except that immediately after entering the loop
the <code class="inline">c:handle_continue/2</code> callback will be invoked with the value
<code class="inline">continue</code> as first argument.</p>
<p>Returning <code class="inline">:ignore</code> will cause <code class="inline">start_link/3</code> to return <code class="inline">:ignore</code> and
the process will exit normally without entering the loop or calling
<code class="inline">c:terminate/2</code>. If used when part of a supervision tree the parent
supervisor will not fail to start nor immediately try to restart the
<a href="https://hexdocs.pm/elixir/GenServer.html"><code class="inline">GenServer</code></a>. The remainder of the supervision tree will be started
and so the <a href="https://hexdocs.pm/elixir/GenServer.html"><code class="inline">GenServer</code></a> should not be required by other processes.
It can be started later with <a href="https://hexdocs.pm/elixir/Supervisor.html#restart_child/2"><code class="inline">Supervisor.restart_child/2</code></a> as the child
specification is saved in the parent supervisor. The main use cases for
this are:</p>
<ul>
<li>The <a href="https://hexdocs.pm/elixir/GenServer.html"><code class="inline">GenServer</code></a> is disabled by configuration but might be enabled later.
</li>
<li>An error occurred and it will be handled by a different mechanism than the
<a href="https://hexdocs.pm/elixir/Supervisor.html"><code class="inline">Supervisor</code></a>. Likely this approach involves calling <a href="https://hexdocs.pm/elixir/Supervisor.html#restart_child/2"><code class="inline">Supervisor.restart_child/2</code></a>
after a delay to attempt a restart.
</li>
</ul>
<p>Returning <code class="inline">{:stop, reason}</code> will cause <code class="inline">start_link/3</code> to return
<code class="inline">{:error, reason}</code> and the process to exit with reason <code class="inline">reason</code> without
entering the loop or calling <code class="inline">c:terminate/2</code>.</p>
<p>Callback implementation for <a href="https://hexdocs.pm/elixir/GenServer.html#c:init/1"><code class="inline">GenServer.init/1</code></a>.</p>
</section>
</section>
<section class="detail" id="start_link/0">
<div class="detail-header">
<a href="#start_link/0" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">start_link()</span>
<a href="https://github.com/jsonkenl/xlsxir/blob/master/lib/xlsxir/state_manager.ex#L8" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener">ExDoc</a> (v0.19.3),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" rel="noopener" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
</body>
</html>