public interface MainStorageInterface
Modifier and Type | Method and Description |
---|---|
void |
delete(DsInfo dsInfo)
Deletes the files of the specified data set.
|
void |
delete(String location,
String createId,
String modId)
Deletes the specified file
A dummy may be provided if the readOnly flag is set and no archive storage has been
configured with storageUnit = DATAFILE
|
boolean |
exists(DsInfo dsInfo)
See if the data set exists.
|
boolean |
exists(String location)
See if the data file exists.
|
InputStream |
get(String location,
String createId,
String modId)
Return a stream of data from the specified data file
|
List<DfInfo> |
getDatafilesToArchive(long lowArchivingLevel,
long highArchivingLevel)
Return the list of DfInfos which should be archived to reduce the used storage to between
lowArchivingLevel and highArchivingLevel.
|
List<DsInfo> |
getDatasetsToArchive(long lowArchivingLevel,
long highArchivingLevel)
Return the list of DsInfos which should be archived to reduce the used storage to between
lowArchivingLevel and highArchivingLevel.
|
Path |
getPath(String location,
String createId,
String modId)
Return the physical path corresponding to a location for a datafile.
|
String |
put(DsInfo dsInfo,
String name,
InputStream inputStream)
Store the specified data file and return the chosen location of the file to allow it to be
retrieved.
|
void |
put(InputStream inputStream,
String location)
Store the data file at the specified location.
|
void delete(DsInfo dsInfo) throws IOException
dsInfo
- describes the data set with the files to be deletedIOException
void delete(String location, String createId, String modId) throws IOException
location
- location of the data file to be deletedcreateId
- the icat user name of the creator of this datafile. This is provided so that the
implementation can choose whether or not to trust the ICAT datafile object which
holds this location field.modId
- the icat user name of the modifier of this datafile. This is provided so that the
implementation can choose whether or not to trust the ICAT datafile object which
holds this location field.IOException
boolean exists(DsInfo dsInfo) throws IOException
dsInfo
- describes the data set being queriedIOException
boolean exists(String location) throws IOException
location
- the value from datafile.locationIOException
InputStream get(String location, String createId, String modId) throws IOException
location
- the value from datafile.locationcreateId
- the icat user name of the creator of this datafile. This is provided so that the
implementation can choose whether or not to trust the ICAT datafile object which
holds this location field.modId
- the icat user name of the modifier of this datafile. This is provided so that the
implementation can choose whether or not to trust the ICAT datafile object which
holds this location field.IOException
List<DfInfo> getDatafilesToArchive(long lowArchivingLevel, long highArchivingLevel) throws IOException
lowArchivingLevel
- don't try to reduce space below this levelhighArchivingLevel
- if storage used is less than this return an empty list. Otherwise identify the
list of DsInfos to get the space down to lowArchivingLevelIOException
List<DsInfo> getDatasetsToArchive(long lowArchivingLevel, long highArchivingLevel) throws IOException
lowArchivingLevel
- don't try to reduce space below this levelhighArchivingLevel
- if storage used is less than this return an empty list. Otherwise identify the
list of DsInfos to get the space down to lowArchivingLevelIOException
Path getPath(String location, String createId, String modId) throws IOException
location
- the value from datafile.locationcreateId
- the icat user name of the creator of this datafile. This is provided so that the
implementation can choose whether or not to trust the ICAT datafile object which
holds this location field.modId
- the icat user name of the modifier of this datafile. This is provided so that the
implementation can choose whether or not to trust the ICAT datafile object which
holds this location field.IOException
String put(DsInfo dsInfo, String name, InputStream inputStream) throws IOException
dsInfo
- describes the data set to which the data file should be addedname
- name of file within data setinputStream
- stream of data to storeIOException
void put(InputStream inputStream, String location) throws IOException
inputStream
- stream of data to storelocation
- where to store the fileIOException
Copyright © 2016 The ICAT Collaboration. All rights reserved.