summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/io/timed_caches_manager.erl')
-rw-r--r-- | src/io/timed_caches_manager.erl | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/io/timed_caches_manager.erl b/src/io/timed_caches_manager.erl index ad66fbb..aad7c37 100644 --- a/src/io/timed_caches_manager.erl +++ b/src/io/timed_caches_manager.erl @@ -1,7 +1,14 @@ -module(timed_caches_manager). -behavior(gen_server). -%%%% gen_server exports +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%% 'gen_server' Exports -export( [ init/1, @@ -14,7 +21,7 @@ ] ). -%%%% actual interface +%%%% Actual Interface -export( [ add_cache/3, @@ -25,10 +32,8 @@ ) . %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%% Manager %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% delete_cache (DB) -> ets:delete(DB). @@ -69,11 +74,10 @@ inherit_cache (CacheList, DB, Heir) -> [DB|CacheList] end. - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%% gen_server +%%%% 'gen_server' functions init (CacheList) -> io:format("~nStarting Timed Caches Manager..."), {ok, CacheList}. @@ -111,7 +115,7 @@ format_status (_, [_, State]) -> handle_info(_, State) -> {noreply, State}. -%%%% actual interface +%%%% Interface Functions delete_cache (CacheList, DB) -> case lists:member(DB, CacheList) of true -> |