Ejemplo n.º 1
0
 @Override
 public Response readlink(String path, Map<Byte, Long> instanceMap) throws TException {
   path = makePathAbsolute(path);
   // can be sent to ANY partition that replicates the path - we send it to the first returned by
   // the oracle
   Set<Byte> parts = Sets.newHashSet(Byte.valueOf(partition));
   Command cmd = newCommand(CommandType.READLINK, parts, instanceMap);
   ReadlinkCmd readlink = new ReadlinkCmd(path, parts);
   cmd.setReadlink(readlink);
   String result = (String) replica.submitCommand(cmd);
   Response r = new Response(replica.getInstanceMap());
   r.setReadlink(result);
   return r;
 }