Package scfs.directoryService

Examples of scfs.directoryService.NoSharingDirectoryService


      this.accessor = init("SCFS", false, clientId);
      noCacheDis = new NoCacheDirectoryService(clientId, accessor);
      this.directoryService = new MetadataCacheOnSyncDirectoryService(noCacheDis);
    }else{
      SecretKey k = null;
      this.directoryService = new NoSharingDirectoryService(disId, k, false);
    }

    //init PNS
    if(config.isNonSharing()){
      namespace = new NoSharingDirectoryService("", null, true);
    }else{
      try {
        namespaceStats = directoryService.getPrivateNameSpaceMetadata();
      } catch (DirectoryServiceException e) {
        try {
          String pathId = getNextIdPath();
          SecretKey key = MyAESCipher.generateSecretKey();
          namespaceStats = new PrivateNameSpaceStats(pathId, key);
          directoryService.putPrivateNameSpaceMetadata(clientId, namespaceStats);

        } catch (DirectoryServiceException e1) {
          e1.printStackTrace();
          if(e1 instanceof DirectoryServiceConnectionProblemException)
            System.out.println("Cannot create the private namespace metadata");
        } catch (Exception e1) {    e1.printStackTrace(); }
      }
      namespace = new NoSharingDirectoryService(namespaceStats.getIdPath(), namespaceStats.getKey(), true);
    }

    DirectoryService redirect = new DirectoryServiceRedirect(clientId, directoryService, namespace);

    this.lockService = new LockService(accessor, clientId);
View Full Code Here

TOP

Related Classes of scfs.directoryService.NoSharingDirectoryService

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.