public interface DatasetOperations
Dataset operations against a specific
DatasetRepository. Implemented by DatasetTemplate.| Modifier and Type | Method and Description |
|---|---|
void |
execute(DatasetRepositoryCallback callback)
Execute a callback for the
DatasetRepository |
<T> org.kitesdk.data.DatasetDescriptor |
getDatasetDescriptor(java.lang.Class<T> targetClass)
Get the
DatasetDescriptor for the given class |
<T> java.lang.String |
getDatasetName(java.lang.Class<T> targetClass)
Get the dataset name to be used for the given class
|
<T> java.util.Collection<T> |
read(java.lang.Class<T> targetClass)
Read all records in the dataset and return as a collection.
|
<T> java.util.Collection<T> |
read(java.lang.Class<T> targetClass,
org.kitesdk.data.PartitionKey partitionKey)
Read records in the dataset partition based on the
PartitionKey and return as a collection. |
<T> void |
read(java.lang.Class<T> targetClass,
RecordCallback<T> callback)
Read all records in the dataset and call the provided callback for each record.
|
<T> void |
read(java.lang.Class<T> targetClass,
RecordCallback<T> callback,
org.kitesdk.data.PartitionKey partitionKey)
Read records in the dataset partition based on the
PartitionKey and call the provided callback for each record. |
<T> void |
write(java.util.Collection<T> records)
Write all records provided in the record collection
|
<T> void read(java.lang.Class<T> targetClass,
RecordCallback<T> callback)
targetClass - the class that is stored in the datasetcallback - the callback to be called for each record<T> java.util.Collection<T> read(java.lang.Class<T> targetClass)
targetClass - the class that is stored in the dataset<T> void read(java.lang.Class<T> targetClass,
RecordCallback<T> callback,
org.kitesdk.data.PartitionKey partitionKey)
PartitionKey and call the provided callback for each record.targetClass - the class that is stored in the datasetcallback - the callback to be called for each recordpartitionKey - the partition key to use for the read<T> java.util.Collection<T> read(java.lang.Class<T> targetClass,
org.kitesdk.data.PartitionKey partitionKey)
PartitionKey and return as a collection.targetClass - the class that is stored in the datasetpartitionKey - the partition key to use for the read<T> void write(java.util.Collection<T> records)
records - the records to writevoid execute(DatasetRepositoryCallback callback)
DatasetRepositorycallback - <T> org.kitesdk.data.DatasetDescriptor getDatasetDescriptor(java.lang.Class<T> targetClass)
DatasetDescriptor for the given classtargetClass - the class stored in the dataset<T> java.lang.String getDatasetName(java.lang.Class<T> targetClass)
targetClass - the class stored in the dataset