docs/advanced/distributed_state_locking/index.html in rbcli-0.3.0 vs docs/advanced/distributed_state_locking/index.html in rbcli-0.3.1

- old
+ new

@@ -1,34 +1,34 @@ <!DOCTYPE html> <html lang="en" class="js csstransforms3d"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta name="generator" content="Hugo 0.74.3" /> + <meta name="generator" content="Hugo 0.88.1" /> <meta name="description" content=""> <link rel="icon" href="/rbcli/images/favicon.png" type="image/png"> <title>Distributed State and Locking :: RBCli Documentation</title> - <link href="/rbcli/css/nucleus.css?1596148729" rel="stylesheet"> - <link href="/rbcli/css/fontawesome-all.min.css?1596148729" rel="stylesheet"> - <link href="/rbcli/css/hybrid.css?1596148729" rel="stylesheet"> - <link href="/rbcli/css/featherlight.min.css?1596148729" rel="stylesheet"> - <link href="/rbcli/css/perfect-scrollbar.min.css?1596148729" rel="stylesheet"> - <link href="/rbcli/css/auto-complete.css?1596148729" rel="stylesheet"> - <link href="/rbcli/css/atom-one-dark-reasonable.css?1596148729" rel="stylesheet"> - <link href="/rbcli/css/theme.css?1596148729" rel="stylesheet"> - <link href="/rbcli/css/hugo-theme.css?1596148729" rel="stylesheet"> + <link href="/rbcli/css/nucleus.css?1634703589" rel="stylesheet"> + <link href="/rbcli/css/fontawesome-all.min.css?1634703589" rel="stylesheet"> + <link href="/rbcli/css/hybrid.css?1634703589" rel="stylesheet"> + <link href="/rbcli/css/featherlight.min.css?1634703589" rel="stylesheet"> + <link href="/rbcli/css/perfect-scrollbar.min.css?1634703589" rel="stylesheet"> + <link href="/rbcli/css/auto-complete.css?1634703589" rel="stylesheet"> + <link href="/rbcli/css/atom-one-dark-reasonable.css?1634703589" rel="stylesheet"> + <link href="/rbcli/css/theme.css?1634703589" rel="stylesheet"> + <link href="/rbcli/css/hugo-theme.css?1634703589" rel="stylesheet"> - <link href="/rbcli/css/theme-blue.css?1596148729" rel="stylesheet"> + <link href="/rbcli/css/theme-blue.css?1634703589" rel="stylesheet"> - <script src="/rbcli/js/jquery-3.3.1.min.js?1596148729"></script> + <script src="/rbcli/js/jquery-3.3.1.min.js?1634703589"></script> <style> :root #header + #content > #left > #rlblock_left{ display:none !important; } @@ -53,18 +53,18 @@ <label for="search-by"><i class="fas fa-search"></i></label> <input data-search-input id="search-by" type="search" placeholder="Search..."> <span data-search-clear=""><i class="fas fa-times"></i></span> </div> -<script type="text/javascript" src="/rbcli/js/lunr.min.js?1596148729"></script> -<script type="text/javascript" src="/rbcli/js/auto-complete.js?1596148729"></script> +<script type="text/javascript" src="/rbcli/js/lunr.min.js?1634703589"></script> +<script type="text/javascript" src="/rbcli/js/auto-complete.js?1634703589"></script> <script type="text/javascript"> var baseurl = "https:\/\/akhoury6.github.io\/rbcli\/"; </script> -<script type="text/javascript" src="/rbcli/js/search.js?1596148729"></script> +<script type="text/javascript" src="/rbcli/js/search.js?1634703589"></script> </div> <div class="highlightable"> @@ -714,13 +714,13 @@ <li>If another application steals the lock (unlikely but possible), and the application tries to save data, a <code>StandardError</code> will be thrown</li> <li>You can manually attempt to lock/unlock by calling <code>Rbcli.remote_state.lock</code> or <code>Rbcli.remote_state.unlock</code>, respectively.</li> </ol> <h2 id="manual-locking">Manual Locking</h2> <p>Remember: all state in Rbcli is lazy-loaded. Therefore, RBCli wll only attempt to lock the data when you first try to access it. If you need to make sure that the data is locked before executing a block of code, use:</p> -<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ruby" data-lang="ruby"><span style="color:#66d9ef">Rbcli</span><span style="color:#f92672">.</span>remote_state<span style="color:#f92672">.</span>refresh +<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ruby" data-lang="ruby"><span style="color:#66d9ef">Rbcli</span><span style="color:#f92672">.</span>remote_state<span style="color:#f92672">.</span>refresh </code></pre></div><p>to force the lock and retrieve the latest data. You can force an unlock by calling:</p> -<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ruby" data-lang="ruby"><span style="color:#66d9ef">Rbcli</span><span style="color:#f92672">.</span>remote_state<span style="color:#f92672">.</span>disconnect +<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ruby" data-lang="ruby"><span style="color:#66d9ef">Rbcli</span><span style="color:#f92672">.</span>remote_state<span style="color:#f92672">.</span>disconnect </code></pre></div><p>Even if you do not want to store any data, you can leverage manual locking to control access to a different shared resource, such as a stateful API. For example, if you write a cloud deployment toolkit, you can ensure that only one user is attempting to modify a deployment at any given time.</p> <footer class="footline"> @@ -1151,22 +1151,22 @@ </section> <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"> <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div> </div> - <script src="/rbcli/js/clipboard.min.js?1596148729"></script> - <script src="/rbcli/js/perfect-scrollbar.min.js?1596148729"></script> - <script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1596148729"></script> - <script src="/rbcli/js/jquery.sticky.js?1596148729"></script> - <script src="/rbcli/js/featherlight.min.js?1596148729"></script> - <script src="/rbcli/js/highlight.pack.js?1596148729"></script> + <script src="/rbcli/js/clipboard.min.js?1634703589"></script> + <script src="/rbcli/js/perfect-scrollbar.min.js?1634703589"></script> + <script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1634703589"></script> + <script src="/rbcli/js/jquery.sticky.js?1634703589"></script> + <script src="/rbcli/js/featherlight.min.js?1634703589"></script> + <script src="/rbcli/js/highlight.pack.js?1634703589"></script> <script>hljs.initHighlightingOnLoad();</script> - <script src="/rbcli/js/modernizr.custom-3.6.0.js?1596148729"></script> - <script src="/rbcli/js/learn.js?1596148729"></script> - <script src="/rbcli/js/hugo-learn.js?1596148729"></script> + <script src="/rbcli/js/modernizr.custom-3.6.0.js?1634703589"></script> + <script src="/rbcli/js/learn.js?1634703589"></script> + <script src="/rbcli/js/hugo-learn.js?1634703589"></script> - <link href="/rbcli/mermaid/mermaid.css?1596148729" rel="stylesheet" /> - <script src="/rbcli/mermaid/mermaid.js?1596148729"></script> + <link href="/rbcli/mermaid/mermaid.css?1634703589" rel="stylesheet" /> + <script src="/rbcli/mermaid/mermaid.js?1634703589"></script> <script> mermaid.initialize({ startOnLoad: true }); </script>