Examples of Storage


Examples of org.atomojo.app.Storage

               DB db = dbinfo.getDB();
               if (dbNames.size()>0 && !dbNames.contains(db.getName())) {
                  continue;
               }
               try {
                  Storage storage = storageFactory.getStorage(db);
                  Backup backup = new Backup(db,storage,AtomApplication.RESOURCE_BASE);
                  File zipFile = new File(dir,db.getName()+".zip");
                  backup.toZip(db.getName(), zipFile);
               } catch (Exception ex) {
                  getLogger().log(Level.SEVERE,"Cannot backup database "+db.getName()+" due to exception.",ex);
View Full Code Here

Examples of org.atomojo.app.Storage

                  continue;
               }
               File dbDir = new File(dir,db.getName());
               boolean needsCleanup = false;
               try {
                  Storage storage = storageFactory.getStorage(db);
                  File zipFile = new File(dir,db.getName()+".zip");
                  if (!dbDir.exists() && zipFile.exists()) {
                     // This is what we want but it doesn't work
                     //introspectionURI = new URI("jar:"+zipFile.toURI()+"!/_introspection_.xml");
                     getLogger().info("Extracting backup for restore...");
View Full Code Here

Examples of org.atomojo.app.Storage

         getResponse().setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
         return new StringRepresentation("Non-XML media type for entity body: "+entity.getMediaType().getName());
      }
     
      final DB db = (DB)getRequest().getAttributes().get(App.DB_ATTR);
      final Storage storage = (Storage)getRequest().getAttributes().get(App.STORAGE_ATTR);
      XMLRepresentationParser parser = new XMLRepresentationParser();
      try {
         DocumentDestination dest = new DocumentDestination();
        
         parser.parse(entity,AdminApplication.createAdminDocumentDestination(dest,AdminXML.NM_RESTORE));
View Full Code Here

Examples of org.atomojo.app.Storage

   }
  
   public Representation get()
   {
      final DB db = (DB)getRequest().getAttributes().get(App.DB_ATTR);
      final Storage storage = (Storage)getRequest().getAttributes().get(App.STORAGE_ATTR);
      final Reference resourceBase = (Reference)getRequest().getAttributes().get(App.RESOURCE_BASE_ATTR);
      File tmpDir = (File)getContext().getAttributes().get(WebComponent.ATOMOJO_TMP_DIR);
      long tstamp = System.currentTimeMillis();
      String baseName = db.getName()+".backup."+tstamp;
      /*
 
View Full Code Here

Examples of org.atomojo.app.Storage

   }
  
   public Representation post(Representation entity)
   {
      final DB db = (DB)getRequest().getAttributes().get(App.DB_ATTR);
      final Storage storage = (Storage)getRequest().getAttributes().get(App.STORAGE_ATTR);
      final Reference resourceBase = (Reference)getRequest().getAttributes().get(App.RESOURCE_BASE_ATTR);
      if (getRequest().getResourceRef().getRemainingPart().endsWith(".zip")) {
         getResponse().setStatus(Status.CLIENT_ERROR_METHOD_NOT_ALLOWED);
         return null;
      }
View Full Code Here

Examples of org.atomojo.app.Storage

      setNegotiated(false);
   }
  
   public Representation get() {
      final DB db = (DB)getRequest().getAttributes().get(App.DB_ATTR);
      final Storage storage = (Storage)getRequest().getAttributes().get(App.STORAGE_ATTR);
      try {
         db.stop();
         db.connect();
         getResponse().setStatus(Status.SUCCESS_OK);
         Representation rep = new StringRepresentation("<success xmlns='"+AdminXML.NAMESPACE+"'/>",MediaType.APPLICATION_XML);
View Full Code Here

Examples of org.atomojo.app.Storage

   }
  
   public Representation get()
   {
      final DB db = (DB)getRequest().getAttributes().get(App.DB_ATTR);
      final Storage storage = (Storage)getRequest().getAttributes().get(App.STORAGE_ATTR);
      final String name = getRequest().getAttributes().get("name").toString();

      SyncProcess proc = db.getSyncProcess(name);
     
      if (proc!=null) {
View Full Code Here

Examples of org.broadinstitute.gatk.engine.io.storage.Storage

* @author mhanna
* @version 0.1
*/
public class DirectOutputTracker extends OutputTracker {
    public <T> T getStorage( Stub<T> stub ) {
        Storage target = outputs.get(stub);
        if( target == null ) {
            target = StorageFactory.createStorage(stub);
            outputs.put(stub, target);
        }
        return (T)target;
View Full Code Here

Examples of org.eclipse.jgit.lib.Ref.Storage

      }
    }

    RefDatabase refDb = repo.getRefDatabase();
    for (Ref r : refDb.getRefs(RefDatabase.ALL).values()) {
      Storage storage = r.getStorage();
      if (storage == Storage.LOOSE || storage == Storage.LOOSE_PACKED)
        ret.numberOfLooseRefs++;
      if (storage == Storage.PACKED || storage == Storage.LOOSE_PACKED)
        ret.numberOfPackedRefs++;
    }
View Full Code Here

Examples of org.garret.perst.Storage

    this.databaseFile = databaseFile;
    this.xstreamFile = xstreamFile;
  }

  public void toXML() {
    Storage db = StorageFactory.getInstance().createStorage();
    db.open(databaseFile);
    new XStreamFile(xstreamFile).write((Set) db.getRoot());
    db.close();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.