anchor.diff:  -include("disco.hrl").
   -include("gs_util.hrl").
   
  --type connection_status() :: undefined | up | erlang:timestamp().
  +-type connection_status() :: undefined | {up | down, erlang:timestamp()}.
   
   -record(dnode, {host :: host_name(),
                   node_mon :: pid(),
  
positive.code:                               {#dnode{host = Host,
                                        node_mon = node_mon:start_link(Host, NodePorts),
                                        manual_blacklist = lists:member(Host, Blacklist),
                                        connection_status = undefined,
                                        slots = Slots,
                                        num_running = 0,
                                        stats_ok = 0,
  
negative.code:     #node_ports{get_port = GetPort, put_port = PutPort}.
  
  -spec allow_write(#dnode{}) -> boolean().
  allow_write(#dnode{connection_status = {up, _},
                     manual_blacklist = false}) ->
      true;
  allow_write(#dnode{}) ->
      false.
  
  -spec allow_read(#dnode{}) -> boolean().
  allow_read(#dnode{connection_status = {up, _}}) ->
      true;
  allow_read(#dnode{}) ->
      false.
  