anchor.diff:      end.
   
   init(_) ->
  -    start_snap_loop(),
       {_, SnapDir} = application:get_env(imem, imem_snapshot_dir),
       SnapshotDir = filename:absname(SnapDir),
       case filelib:is_dir(SnapDir) of
  
positive.code:     ?Info("snapshot directory ~s~n", [SnapshotDir]),
  
      process_flag(trap_exit, true),
      {ok,#state{snapdir = SnapshotDir}}.
  
  handle_info(imem_snap_loop, #state{snapFun=SFun,snapHash=SHash} = State) ->
      case ?GET_SNAPSHOT_CYCLE_WAIT of
          MCW when (is_integer(MCW) andalso (MCW >= 100)) ->
  
negative.code:             erlang:whereis(?MODULE) ! imem_snap_loop
          end).
  -endif.
  
  fire_cluster_snap(Tables) ->
      IntervalMs = ?GET_CLUSTER_SNAPSHOT_INTERVAL,
      ?Info("starting ~p snapshot after ~pms", [Tables, IntervalMs]),
      erlang:send_after(IntervalMs, ?MODULE, {cluster_snap, Tables}).
  
  
  %% ----- SERVER INTERFACE ------------------------------------------------
  