Esempio n. 1
0
 /** The remote invocation occurs only if the cache misses. */
 public Stream invoke(RemoteCall c, RemoteReference ref) throws NetworkException {
   Stream args = ((RmeRemoteCall) c).getArguments();
   if (table.containsKey(args)) {
     Stream returnValue = OrbAccessor.getStream();
     returnValue.fill((RmeStream) table.get(args));
     return returnValue;
   } else {
     Stream returnValue = super.invoker.invoke(c, ref);
     Stream backupValue = OrbAccessor.getStream();
     backupValue.fill(returnValue);
     table.put(args, backupValue);
     return returnValue;
   }
 }