tango.net.cluster.tina.CacheThread

License:

BSD style: see license.txt

Version:

July 2004: Initial release

Author:

Kris
class CacheThread : ClusterThread #
Thread for handling cache requests
this(AbstractServer server, IConduit conduit, Cluster cluster, ClusterCache cache) #
Note that the conduit stays open until the client kills it
void dispatch() #
process client requests
void load(ProtocolWriter.Command cmd, char[] channel, char[] element) #
Manages the loading of cache entries remotely, upon the host that actually contains the cache entry. The benefit of this approach lies in the ability to 'gate' access to specific resources across the entire network. That is; where particular cache entries are prohibitively costly to construct, it is worthwhile ensuring that cost is reduced to a bare minimum. These remote loaders allow the cache host to block multiple network clients until there's a new entry available. Without this mechanism, it would become possible for multiple network clients to request the same entry simultaneously, therefore increasing the overall cost. The end result is similar to that of a distributed transaction.