* Message contains a Command. Execute it against *this* object and return result.
*/
@Override
public Object handle(Message req) {
if (isValid(req)) {
ReplicableCommand cmd = null;
try {
cmd = (ReplicableCommand) req_marshaller.objectFromByteBuffer(req.getBuffer(), req.getOffset(), req.getLength());
if (cmd instanceof CacheRpcCommand)
return executeCommand((CacheRpcCommand) cmd, req);
else
return cmd.perform(null);
} catch (InterruptedException e) {
log.warnf("Shutdown while handling command %s", cmd);
return new ExceptionResponse(new CacheException("Cache is shutting down"));
} catch (Throwable x) {
if (cmd == null)