{
int op;
Fqn fqn;
Object key, val, retval;
Map map;
DataNode n;
boolean flag;
byte[] state;
while (t != null && Thread.currentThread().equals(t))
{
try
{
op = input.readInt();
}
catch (IOException e)
{
mylog.debug("Client closed socket");
close();
break;
}
try
{
output.reset();
switch (op)
{
case DelegatingCacheLoader.delegateGetChildrenNames:
fqn = (Fqn) input.readObject();
Set children = c.getChildrenNames(fqn);
output.writeObject(children); // this may be null - that's okay
break;
case DelegatingCacheLoader.delegateGetKey:
fqn = (Fqn) input.readObject();
key = input.readObject();
retval = c.get(fqn, key);
output.writeObject(retval);
break;
case DelegatingCacheLoader.delegateGet:
fqn = (Fqn) input.readObject();
n = c.get(fqn);
if (n == null)
{ // node doesn't exist - return null
output.writeObject(n);
break;
}
map = n.getData();
if (map == null) map = new HashMap();
output.writeObject(map);
break;
case DelegatingCacheLoader.delegateExists:
fqn = (Fqn) input.readObject();