bees.core
Interface NodeCache.EventHandler
- All Known Implementing Classes:
- Node, ReliableDataRequestCapsule, NodeTest, StatsCapsule, PrimerCapsule, AdvertiseCapsule, AdvertiseMaterial, NodeHealthCapsule, NodeHealth, PokeCapsule, LiveNeighbor, ConfigurationCapsule, PathfinderSession
- Enclosing class:
- NodeCache
- public static interface NodeCache.EventHandler
Elements of this type in the node cache will receive calls when
one of a set of events occurs.
XXX Not sure if this is useful or not, and it can probably be done
better
removed
public void removed(Node node,
ProtocolSession ps)
- This is called when the element is manually removed from
from the cache.
- Parameters:
node
- The current Node object.ps
- The ProtocolSession that the NodeCache is
collected
public IntegerPermission collected(Node node,
ProtocolSession ps)
- This is called when this element is up for collection,
the return value specifies the new expiration time. Null
is returned if the element should really be collected.
- Parameters:
node
- The current Node object.ps
- The ProtocolSession that the NodeCache is attached to.- Returns:
- Null if the element should be collected or an
IntegerPermission specifying the number of milliseconds to delay
before this element should be collected again.
This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/