Tabnine Logo
SnapshotInfo.getParent
Code IndexAdd Tabnine to your IDE (free)

How to use
getParent
method
in
org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo

Best Java code snippets using org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo.getParent (Showing top 9 results out of 315)

origin: apache/cloudstack

protected void deleteSnapshotCacheChain(SnapshotInfo snapshot) {
  while (snapshot != null) {
    cacheMgr.deleteCacheObject(snapshot);
    snapshot = snapshot.getParent();
  }
}
origin: apache/cloudstack

protected void releaseSnapshotCacheChain(SnapshotInfo snapshot) {
  while (snapshot != null) {
    cacheMgr.releaseCacheObject(snapshot);
    snapshot = snapshot.getParent();
  }
}
origin: apache/cloudstack

private DataObject cacheSnapshotChain(SnapshotInfo snapshot, Scope scope) {
  DataObject leafData = null;
  DataStore store = cacheMgr.getCacheStorage(snapshot, scope);
  while (snapshot != null) {
    DataObject cacheData = cacheMgr.createCacheObject(snapshot, store);
    if (leafData == null) {
      leafData = cacheData;
    }
    snapshot = snapshot.getParent();
  }
  return leafData;
}
origin: apache/cloudstack

protected DataObject cacheSnapshotChain(SnapshotInfo snapshot, Scope scope) {
  DataObject leafData = null;
  DataStore store = cacheMgr.getCacheStorage(snapshot, scope);
  while (snapshot != null) {
    DataObject cacheData = cacheMgr.createCacheObject(snapshot, store);
    if (leafData == null) {
      leafData = cacheData;
    }
    snapshot = snapshot.getParent();
  }
  return leafData;
}
origin: apache/cloudstack

public SnapshotObjectTO(SnapshotInfo snapshot) {
  this.path = snapshot.getPath();
  this.setId(snapshot.getId());
  VolumeInfo vol = snapshot.getBaseVolume();
  if (vol != null) {
    this.volume = (VolumeObjectTO)vol.getTO();
    this.setVmName(vol.getAttachedVmName());
  }
  SnapshotInfo parentSnapshot = snapshot.getParent();
  ArrayList<String> parentsArry = new ArrayList<String>();
  if (parentSnapshot != null) {
    this.parentSnapshotPath = parentSnapshot.getPath();
    while(parentSnapshot != null) {
      parentsArry.add(parentSnapshot.getPath());
      parentSnapshot = parentSnapshot.getParent();
    }
    parents =  parentsArry.toArray(new String[parentsArry.size()]);
    ArrayUtils.reverse(parents);
  }
  this.dataStore = snapshot.getDataStore().getTO();
  this.setName(snapshot.getName());
  this.hypervisorType = snapshot.getHypervisorType();
  this.quiescevm = false;
}
origin: apache/cloudstack

SnapshotInfo parent = snapshot.getParent();
boolean deleted = false;
if (parent != null) {
origin: apache/cloudstack

private DataStore findSnapshotImageStore(SnapshotInfo snapshot) {
  Boolean fullSnapshot = true;
  Boolean snapshotFullBackup = snapshot.getFullBackup();
  if (snapshotFullBackup != null) {
    fullSnapshot = snapshotFullBackup;
  }
  if (fullSnapshot) {
    return dataStoreMgr.getImageStore(snapshot.getDataCenterId());
  } else {
    SnapshotInfo parentSnapshot = snapshot.getParent();
    // Note that DataStore information in parentSnapshot is for primary
    // data store here, we need to
    // find the image store where the parent snapshot backup is located
    SnapshotDataStoreVO parentSnapshotOnBackupStore = null;
    if (parentSnapshot != null) {
      parentSnapshotOnBackupStore = _snapshotStoreDao.findBySnapshot(parentSnapshot.getId(), DataStoreRole.Image);
    }
    if (parentSnapshotOnBackupStore == null) {
      return dataStoreMgr.getImageStore(snapshot.getDataCenterId());
    }
    return dataStoreMgr.getDataStore(parentSnapshotOnBackupStore.getDataStoreId(), parentSnapshotOnBackupStore.getRole());
  }
}
origin: apache/cloudstack

DataStore primaryStore = snapshotOnPrimary.getDataStore();
try {
  SnapshotInfo parent = snapshotOnPrimary.getParent();
  if (parent != null && primaryStore instanceof PrimaryDataStoreImpl) {
    if (((PrimaryDataStoreImpl)primaryStore).getPoolType() != StoragePoolType.RBD) {
origin: apache/cloudstack

@Override
public SnapshotInfo backupSnapshot(SnapshotInfo snapshot) {
  SnapshotInfo parentSnapshot = snapshot.getParent();
org.apache.cloudstack.engine.subsystem.api.storageSnapshotInfogetParent

Popular methods of SnapshotInfo

  • getId
  • getBaseVolume
  • getDataStore
  • getHypervisorType
  • getName
  • getTO
  • getVolumeId
  • getAccountId
  • getDataCenterId
  • getSize
  • getUuid
  • addPayload
  • getUuid,
  • addPayload,
  • getChild,
  • getFullBackup,
  • getLocationType,
  • getPath,
  • getPayload,
  • processEvent,
  • delete

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now