Package scfs.directoryService.exceptions

Examples of scfs.directoryService.exceptions.DirectoryServiceException


      Statistics.incCas(System.currentTimeMillis()-time);
    } catch (DepSpaceException e) {
      throw new DirectoryServiceConnectionProblemException("Connection Problem");
    }
    if(tuple != null)
      throw new DirectoryServiceException("Node already exists");
  }
View Full Code Here


    } catch (DepSpaceException e) {
      throw new DirectoryServiceConnectionProblemException("Connection Problem");
    }

    if(tuple == null)
      throw new DirectoryServiceException("Tuple not Found!");

    NodeMetadata node = new NodeMetadata(tuple.getFields(), tuple.getC_rd(), tuple.getC_in());

    return node;
  }
View Full Code Here

      long tempo = System.currentTimeMillis()-time;
      Printer.println("  -> End operation rdAll at DepSpace", "azul");
      Printer.println("  -> Operation rdAll took: " + Long.toString(tempo) + " milis", "azul");
      Statistics.incRdall(System.currentTimeMillis()-time);
      if(listTuples == null)
        throw new DirectoryServiceException("Directory not found");
      else{
        Collection<NodeMetadata> res = new ArrayList<NodeMetadata>();
        for (DepTuple tup :  listTuples)
          res.add(new NodeMetadata(tup.getFields(), tup.getC_rd(), tup.getC_in()));
View Full Code Here

      long tempo = System.currentTimeMillis()-time;
      Printer.println("  -> End operation rdp at DepSpace", "azul");
      Printer.println("  -> Operation rdp took: " + Long.toString(tempo) + " milis", "azul");
      Statistics.incRdall(System.currentTimeMillis()-time);
      if(listTuples == null)
        throw new DirectoryServiceException("Data not found");
      else{
        Collection<NodeMetadata> res = new ArrayList<NodeMetadata>();
        for (DepTuple tup : listTuples)
          res.add(new NodeMetadata(tup.getFields(), tup.getC_rd(), tup.getC_in()));
View Full Code Here

      long tempo = System.currentTimeMillis()-time;
      Printer.println("  -> End operation rdp at DepSpace", "azul");
      Printer.println("  -> Operation rdp took: " + Long.toString(tempo) + " milis", "azul");
      Statistics.incRdp(System.currentTimeMillis()-time);
      if(tuple == null)
        throw new DirectoryServiceException("Tuple not Found!");

      return new PrivateNameSpaceStats((String)tuple.getFields()[1], (SecretKey)tuple.getFields()[2]);
    } catch (DepSpaceException e) {
      throw new DirectoryServiceConnectionProblemException("Connection Problem");
    }
View Full Code Here

      long tempo = System.currentTimeMillis()-time;
      Printer.println("  -> End operation cas at DepSpace", "azul");
      Printer.println("  -> Operation cas took: " + Long.toString(tempo) + " milis", "azul");
      Statistics.incCas(System.currentTimeMillis()-time);
      if(tuple != null)
        throw new DirectoryServiceException("Node already exists");
    } catch (DepSpaceException e) {
      throw new DirectoryServiceConnectionProblemException("Connection Problem");
    }
  }
View Full Code Here

  public List<String[]> getCredentials(int clientId) throws DirectoryServiceException {
    try {
      String s = new String(""+clientId);
      DepTuple tuple = accessor.rdp(DepTuple.createTuple(s, "*"));
      if(tuple == null)
        throw new DirectoryServiceException("There are no client credentials.");
     
      return stringToList((String) tuple.getFields()[1]);
    } catch (DepSpaceException e) {
      throw new DirectoryServiceConnectionProblemException("Connection Problem");
    }
View Full Code Here

  public NodeMetadata getMetadata(String path) throws DirectoryServiceException{
    NodeMetadata m = metadataBag.get(path);
    if(m != null)
      return m;
    throw new DirectoryServiceException("Node not exists");
  }
View Full Code Here

    throw new DirectoryServiceException("Node not exists");
  }

  public void putMetadata(NodeMetadata m) throws DirectoryServiceException{
    if(metadataBag.putIfAbsent(m.getPath(), m)!=null)
      throw new DirectoryServiceException("Node Already Exists!");
    writeMetadata();
  }
View Full Code Here

    writeMetadata();
  }

  public void removeMetadata(String path) throws DirectoryServiceException{
    if(metadataBag.remove(path)==null)
      throw new DirectoryServiceException("Node not exists.");
    writeMetadata();
  }
View Full Code Here

TOP

Related Classes of scfs.directoryService.exceptions.DirectoryServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.