|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.systemsx.cisd.openbis.dss.generic.shared.utils.SegmentedStoreUtils
public class SegmentedStoreUtils
Utility methods for segmented stores.
Constructor Summary | |
---|---|
SegmentedStoreUtils()
|
Method Summary | |
---|---|
static void |
cleanUp(ch.systemsx.cisd.openbis.generic.shared.dto.SimpleDataSetInformationDTO dataSet,
java.io.File storeRoot,
java.lang.String newShareId,
ch.systemsx.cisd.openbis.dss.generic.shared.IShareIdManager shareIdManager,
ch.systemsx.cisd.common.logging.ISimpleLogger logger)
Deletes specified data set in the old share if it is already in the new one or in the new one if it is still in the old one. |
static void |
deleteDataSet(ch.systemsx.cisd.openbis.generic.shared.basic.dto.IDatasetLocation dataSet,
ch.systemsx.cisd.openbis.dss.generic.shared.IDataSetDirectoryProvider dataSetDirectoryProvider,
ch.systemsx.cisd.openbis.dss.generic.shared.IShareIdManager shareIdManager,
ch.systemsx.cisd.common.logging.ISimpleLogger logger)
Deletes specified data set. |
static void |
deleteDataSetInstantly(java.lang.String dataSetCode,
java.io.File dataSetDirInStore,
ch.systemsx.cisd.common.logging.ISimpleLogger logger)
Deletes specified data set at specified location. |
static java.lang.String |
findIncomingShare(java.io.File incomingFolder,
java.io.File storeRoot,
ch.systemsx.cisd.common.logging.ISimpleLogger logger)
Returns first the id of the first incoming share folder of specified store root which allows to move a file from specified incoming folder to the incoming share. |
static java.io.File[] |
getShares(java.io.File storeRootDir)
Lists all folders in specified store root directory which match share pattern. |
static java.util.List<Share> |
getSharesWithDataSets(java.io.File storeRoot,
java.lang.String dataStoreCode,
boolean filterOutToBeIgnoredForShuffling,
java.util.Set<java.lang.String> incomingShares,
ch.systemsx.cisd.common.filesystem.IFreeSpaceProvider freeSpaceProvider,
ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService service,
ch.systemsx.cisd.common.logging.ISimpleLogger log)
Gets a list of all shares of specified store root directory. |
static void |
moveDataSetToAnotherShare(java.io.File dataSetDirInStore,
java.io.File share,
ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService service,
ch.systemsx.cisd.openbis.dss.generic.shared.IShareIdManager shareIdManager,
ch.systemsx.cisd.openbis.dss.generic.shared.IChecksumProvider checksumProvider,
ch.systemsx.cisd.common.logging.ISimpleLogger logger)
Moves the specified data set to the specified share. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SegmentedStoreUtils()
Method Detail |
---|
public static java.io.File[] getShares(java.io.File storeRootDir)
public static java.lang.String findIncomingShare(java.io.File incomingFolder, java.io.File storeRoot, ch.systemsx.cisd.common.logging.ISimpleLogger logger)
public static java.util.List<Share> getSharesWithDataSets(java.io.File storeRoot, java.lang.String dataStoreCode, boolean filterOutToBeIgnoredForShuffling, java.util.Set<java.lang.String> incomingShares, ch.systemsx.cisd.common.filesystem.IFreeSpaceProvider freeSpaceProvider, ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService service, ch.systemsx.cisd.common.logging.ISimpleLogger log)
dataStoreCode
- Code of the data store to which the root belongs.filterOutToBeIgnoredForShuffling
- If true
no share will be returned which
has property ignored-for-shuffling == true
incomingShares
- Set of IDs of incoming shares. Will be used to mark Share
object in the returned list.freeSpaceProvider
- Provider of free space used for all shares.service
- Access to openBIS API in order to get all data sets and to update data set
size.log
- Logger for logging size calculations.public static void moveDataSetToAnotherShare(java.io.File dataSetDirInStore, java.io.File share, ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService service, ch.systemsx.cisd.openbis.dss.generic.shared.IShareIdManager shareIdManager, ch.systemsx.cisd.openbis.dss.generic.shared.IChecksumProvider checksumProvider, ch.systemsx.cisd.common.logging.ISimpleLogger logger)
share
. Its name is the
share id.
This method works as follows:
service
- to access openBIS AS.checksumProvider
- public static void deleteDataSet(ch.systemsx.cisd.openbis.generic.shared.basic.dto.IDatasetLocation dataSet, ch.systemsx.cisd.openbis.dss.generic.shared.IDataSetDirectoryProvider dataSetDirectoryProvider, ch.systemsx.cisd.openbis.dss.generic.shared.IShareIdManager shareIdManager, ch.systemsx.cisd.common.logging.ISimpleLogger logger)
public static void deleteDataSetInstantly(java.lang.String dataSetCode, java.io.File dataSetDirInStore, ch.systemsx.cisd.common.logging.ISimpleLogger logger)
public static void cleanUp(ch.systemsx.cisd.openbis.generic.shared.dto.SimpleDataSetInformationDTO dataSet, java.io.File storeRoot, java.lang.String newShareId, ch.systemsx.cisd.openbis.dss.generic.shared.IShareIdManager shareIdManager, ch.systemsx.cisd.common.logging.ISimpleLogger logger)
shareIdManager
- provides the current share.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |