Package depskys.core

Examples of depskys.core.DepSkySDataUnit


  public DepSkyAcessor(int clientId){
    this.localDS = new LocalDepSkySClient(clientId, true);
  }

  public byte[] readMatchingFrom(String fileId, SecretKey key, byte[] hash){
    DepSkySDataUnit dataU = new DepSkySDataUnit(fileId);
    dataU.clearAllCaches();
    byte[] data = null;
    try {
      Printer.println("  -> Start download at depsky", "verde");
      long acMil = System.currentTimeMillis();
      data = localDS.readMatching(dataU, hash);
View Full Code Here


    return data;
  }
 
  public byte[] readFrom(String fileId, SecretKey key){
    DepSkySDataUnit dataU = new DepSkySDataUnit(fileId);
    dataU.clearAllCaches();
    byte[] data = null;
    try {
      Printer.println("  -> Start download at depsky", "verde");
      long acMil = System.currentTimeMillis();
      data = localDS.read(dataU);
View Full Code Here

  }
 
  public byte[] writeTo(String fileId, byte[] value, SecretKey key){

    try {
      DepSkySDataUnit dataU = new DepSkySDataUnit(fileId);
      dataU.setUsingPVSS(true);
      Printer.println("  -> Start upload at depsky", "verde");
      long acMil = System.currentTimeMillis();
      byte[] hash = localDS.write(dataU, value);
      long tempo = System.currentTimeMillis() - acMil;
      Statistics.incWrite(tempo, value.length);
View Full Code Here

  public int garbageCollection(String fileId, int numVersionToKeep){
    return 0;
  }
 
  public int setPermition(String fileId, String permition, LinkedList<Pair<String,String>> cannonicalIds){
    DepSkySDataUnit dataU = new DepSkySDataUnit(fileId);
    dataU.setUsingErsCodes(true);
    try {
      localDS.setAcl(dataU, permition, cannonicalIds);
      return 1;
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of depskys.core.DepSkySDataUnit

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.