Package com.gpudb.protocol
Class DownloadFilesRequest
- java.lang.Object
-
- com.gpudb.protocol.DownloadFilesRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class DownloadFilesRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.downloadFiles.Downloads one or more files from KiFS.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDownloadFilesRequest.OptionsA set of string constants for theDownloadFilesRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description DownloadFilesRequest()Constructs a DownloadFilesRequest object with default parameters.DownloadFilesRequest(List<String> fileNames, List<Long> readOffsets, List<Long> readLengths, Map<String,String> options)Constructs a DownloadFilesRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.List<String>getFileNames()An array of the file names to download from KiFS.Map<String,String>getOptions()Optional parameters.List<Long>getReadLengths()Array of number of bytes to read from each respective file infileNames.List<Long>getReadOffsets()An array of starting byte offsets from which to read each respective file infileNames.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.DownloadFilesRequestsetFileNames(List<String> fileNames)An array of the file names to download from KiFS.DownloadFilesRequestsetOptions(Map<String,String> options)Optional parameters.DownloadFilesRequestsetReadLengths(List<Long> readLengths)Array of number of bytes to read from each respective file infileNames.DownloadFilesRequestsetReadOffsets(List<Long> readOffsets)An array of starting byte offsets from which to read each respective file infileNames.StringtoString()
-
-
-
Constructor Detail
-
DownloadFilesRequest
public DownloadFilesRequest()
Constructs a DownloadFilesRequest object with default parameters.
-
DownloadFilesRequest
public DownloadFilesRequest(List<String> fileNames, List<Long> readOffsets, List<Long> readLengths, Map<String,String> options)
Constructs a DownloadFilesRequest object with the specified parameters.- Parameters:
fileNames- An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter. Accepted wildcard characters are asterisk (*) to represent any string of zero or more characters, and question mark (?) to indicate a single character.readOffsets- An array of starting byte offsets from which to read each respective file infileNames. Must either be empty or the same length asfileNames. If empty, files are downloaded in their entirety. If not empty,readLengthsmust also not be empty.readLengths- Array of number of bytes to read from each respective file infileNames. Must either be empty or the same length asfileNames. If empty, files are downloaded in their entirety. If not empty,readOffsetsmust also not be empty.options- Optional parameters.FILE_ENCODING: Encoding to be applied to the output file data. When using JSON serialization it is recommended to specify this asBASE64. Supported values:BASE64: Apply base64 encoding to the output file data.NONE: Do not apply any encoding to the output file data.
NONE.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getFileNames
public List<String> getFileNames()
An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter.Accepted wildcard characters are asterisk (*) to represent any string of zero or more characters, and question mark (?) to indicate a single character.
- Returns:
- The current value of
fileNames.
-
setFileNames
public DownloadFilesRequest setFileNames(List<String> fileNames)
An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter.Accepted wildcard characters are asterisk (*) to represent any string of zero or more characters, and question mark (?) to indicate a single character.
- Parameters:
fileNames- The new value forfileNames.- Returns:
thisto mimic the builder pattern.
-
getReadOffsets
public List<Long> getReadOffsets()
An array of starting byte offsets from which to read each respective file infileNames. Must either be empty or the same length asfileNames. If empty, files are downloaded in their entirety. If not empty,readLengthsmust also not be empty.- Returns:
- The current value of
readOffsets.
-
setReadOffsets
public DownloadFilesRequest setReadOffsets(List<Long> readOffsets)
An array of starting byte offsets from which to read each respective file infileNames. Must either be empty or the same length asfileNames. If empty, files are downloaded in their entirety. If not empty,readLengthsmust also not be empty.- Parameters:
readOffsets- The new value forreadOffsets.- Returns:
thisto mimic the builder pattern.
-
getReadLengths
public List<Long> getReadLengths()
Array of number of bytes to read from each respective file infileNames. Must either be empty or the same length asfileNames. If empty, files are downloaded in their entirety. If not empty,readOffsetsmust also not be empty.- Returns:
- The current value of
readLengths.
-
setReadLengths
public DownloadFilesRequest setReadLengths(List<Long> readLengths)
Array of number of bytes to read from each respective file infileNames. Must either be empty or the same length asfileNames. If empty, files are downloaded in their entirety. If not empty,readOffsetsmust also not be empty.- Parameters:
readLengths- The new value forreadLengths.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.FILE_ENCODING: Encoding to be applied to the output file data. When using JSON serialization it is recommended to specify this asBASE64. Supported values:BASE64: Apply base64 encoding to the output file data.NONE: Do not apply any encoding to the output file data.
NONE.
Map.- Returns:
- The current value of
options.
-
setOptions
public DownloadFilesRequest setOptions(Map<String,String> options)
Optional parameters.FILE_ENCODING: Encoding to be applied to the output file data. When using JSON serialization it is recommended to specify this asBASE64. Supported values:BASE64: Apply base64 encoding to the output file data.NONE: Do not apply any encoding to the output file data.
NONE.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-