Permalink
Browse files

Enhance (prototype) records refactoring

  • Loading branch information...
1 parent fa281e4 commit 70c73ead09cc9ad44e326952bf29773d2a7e4e68 @norton norton committed Sep 1, 2012
Showing with 16 additions and 0 deletions.
  1. +8 −0 src/ubf_redis_plugin.erl
  2. +8 −0 test/qc/redis_proxy_plugin.erl
View
8 src/ubf_redis_plugin.erl
@@ -30,6 +30,7 @@
%% Required callback API for all UBF contract implementations.
-export([info/0, description/0, keepalive/0]).
+-export([moduleStart/1, moduleRestart/1]).
-export([handlerStart/1, handlerStop/3, handlerRpc/1, handlerEvent/1]).
-import(ubf_plugin_handler, [sendEvent/2, install_handler/2]).
@@ -49,6 +50,13 @@ description() ->
keepalive() ->
ok.
+%% @doc start module
+moduleStart(_Args) ->
+ unused.
+
+%% @doc restart module
+moduleRestart(Args) ->
+ moduleStart(Args).
%% @spec handlerStart(Args::list(any())) ->
%% {accept, Reply::any(), StateName::atom(), StateData::term()} | {reject, Reason::any()}
View
8 test/qc/redis_proxy_plugin.erl
@@ -32,6 +32,7 @@
-include_lib("ubf/include/ubf_plugin_stateless.hrl").
-export([info/0, description/0, keepalive/0]).
+-export([moduleStart/1, moduleRestart/1]).
-export([handlerStart/1, handlerStop/3, handlerRpc/1]).
%% NOTE the following two lines
@@ -48,6 +49,13 @@ description() ->
keepalive() ->
ok.
+%% @doc start module
+moduleStart(_Args) ->
+ unused.
+
+%% @doc restart module
+moduleRestart(Args) ->
+ moduleStart(Args).
%% @spec handlerStart(Args::list(any())) ->
%% {accept, Reply::any(), StateName::atom(), StateData::term()} | {reject, Reason::any()}

0 comments on commit 70c73ea

Please sign in to comment.