Skip to content

Commit

Permalink
fix for #16
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxcapades committed Nov 27, 2023
1 parent c6ceccb commit 2cd9eda
Show file tree
Hide file tree
Showing 14 changed files with 124 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "org.veupathdb.lib.s3"
version = "0.10.1"
version = "0.10.2"

java {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
11 changes: 10 additions & 1 deletion src/main/kotlin/org/veupathdb/lib/s3/s34k/objects/S3Object.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,17 @@ interface S3Object : ObjectResponse {

/**
* Object ETag value.
*
* * v0.10.2
* [https://github.com/VEuPathDB/lib-s34k/issues/16]
*
* Changed this field to nullable.
*
* This field is null when there is an error parsing the XML response from
* MinIO. The MinIO java client emits a warning in this case and sets the
* returned object's ETag value to null instead of throwing an error.
*/
val eTag: String
val eTag: String?

/**
* Object tag management container.
Expand Down
10 changes: 10 additions & 0 deletions src/main/kotlin/org/veupathdb/lib/s3/s34k/params/ExistsParams.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@ interface ExistsParams : RegionRequestParams {
* bucket or object exists in the S3 store.
*/
var callback: ((exists: Boolean) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@ interface BucketGetParams : RegionRequestParams {
* store if the target bucket exists, otherwise `null`.
*/
var callback: ((bucket: S3Bucket?) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@ interface BucketListParams : S3RequestParams {
* store.
*/
var callback: ((buckets: BucketList) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@ interface ObjectGetParams : RegionRequestParams {
* object exists, otherwise it will be passed a `null` value.
*/
var callback: ((handle: S3Object?) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,14 @@ interface ObjectListAllParams : RegionRequestParams {
* The callback will be passed an [ObjectList] value.
*/
var callback: ((objects: ObjectList) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,14 @@ interface ObjectListParams : RegionRequestParams {
* This callback will be passed a list of objects retrieved from the store.
*/
var callback: ((ObjectList) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,14 @@ interface ObjectOpenParams : RegionRequestParams {
* object does not exist, this callback will be passed a `null` value.
*/
var callback: ((StreamObject?) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,14 @@ interface ObjectStatParams : RegionRequestParams {
* This callback will be passed the metadata returned for the target object.
*/
var callback: ((ObjectMeta?) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ package org.veupathdb.lib.s3.s34k.params.`object`
import org.veupathdb.lib.s3.s34k.objects.ObjectStream
import org.veupathdb.lib.s3.s34k.params.RegionRequestParams

/**
* Parameters that control a request to stream all objects from S3.
*
* @since v0.10.0
*/
interface ObjectStreamAllParams : RegionRequestParams {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import org.veupathdb.lib.s3.s34k.objects.ObjectContainer
import org.veupathdb.lib.s3.s34k.objects.ObjectStream
import org.veupathdb.lib.s3.s34k.params.RegionRequestParams

/**
* Parameters that control a request to stream a subset of objects from S3.
*
* @since v0.10.0
*/
interface ObjectStreamParams : RegionRequestParams {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package org.veupathdb.lib.s3.s34k.params.`object`
import org.veupathdb.lib.s3.s34k.SubPathListing
import org.veupathdb.lib.s3.s34k.params.RegionRequestParams

/**
* @since v0.1.0
*/
interface SubPathListParams : RegionRequestParams {

/**
Expand All @@ -22,4 +25,14 @@ interface SubPathListParams : RegionRequestParams {
* This callback will be passed a list of objects retrieved from the store.
*/
var callback: ((SubPathListing) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@ interface TagGetParams : RegionRequestParams {
* from the target.
*/
var callback: ((TagMap) -> Unit)?

/**
* Controls the number of retry attempts that will be made on an exception
* while reading from S3.
*
* Defaults to 1.
*
* @since v0.11.0
*/
var retries: Int
}

0 comments on commit 2cd9eda

Please sign in to comment.