Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JCLOUDS-1635: Add COOL and COLD to Tier #204

Merged
merged 1 commit into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public interface ObjectMetadata extends Comparable<ObjectMetadata> {

public enum StorageClass {
STANDARD(Tier.STANDARD),
STANDARD_IA(Tier.INFREQUENT),
ONEZONE_IA(Tier.INFREQUENT),
STANDARD_IA(Tier.COOL),
ONEZONE_IA(Tier.COOL),
INTELLIGENT_TIERING(Tier.STANDARD),
REDUCED_REDUNDANCY(Tier.STANDARD),
GLACIER(Tier.ARCHIVE),
GLACIER_IR(Tier.ARCHIVE),
GLACIER_IR(Tier.COLD),
DEEP_ARCHIVE(Tier.ARCHIVE);

private final Tier tier;
Expand All @@ -53,6 +53,8 @@ public static StorageClass fromTier(Tier tier) {
switch (tier) {
case STANDARD: return StorageClass.STANDARD;
case INFREQUENT: return StorageClass.STANDARD_IA;
case COOL: return StorageClass.STANDARD_IA;
case COLD: return StorageClass.GLACIER_IR;
case ARCHIVE: return StorageClass.DEEP_ARCHIVE;
}
throw new IllegalArgumentException("invalid tier: " + tier);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@
public enum Tier {
/** Optimize for access speed. */
STANDARD,
/** Balance access speed against storage cost. */
INFREQUENT,
/** @deprecated see COOL. */
@Deprecated INFREQUENT,
/** Slower access speed and reduced storage costs. */
COOL,
/** Even slower access speed and further reduced storage costs. */
COLD,
/**
* Optimize for storage cost. Some providers may require a separate call to
* set the blob to STANDARD tier before access.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

public enum AccessTier {
HOT(Tier.STANDARD),
COOL(Tier.INFREQUENT),
COLD(Tier.INFREQUENT),
COOL(Tier.COOL),
COLD(Tier.COLD),
ARCHIVE(Tier.ARCHIVE);

private final Tier tier;
Expand All @@ -52,6 +52,8 @@ public static AccessTier fromTier(Tier tier) {
switch (tier) {
case STANDARD: return AccessTier.HOT;
case INFREQUENT: return AccessTier.COOL;
case COOL: return AccessTier.COOL;
case COLD: return AccessTier.COLD;
case ARCHIVE: return AccessTier.ARCHIVE;
}
throw new IllegalArgumentException("invalid tier: " + tier);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ public static Location fromValue(String location) {

public enum StorageClass {
ARCHIVE(Tier.ARCHIVE),
COLDLINE(Tier.ARCHIVE),
COLDLINE(Tier.COLD),
DURABLE_REDUCED_AVAILABILITY(Tier.STANDARD),
MULTI_REGIONAL(Tier.STANDARD),
REGIONAL(Tier.STANDARD),
NEARLINE(Tier.INFREQUENT),
NEARLINE(Tier.COOL),
STANDARD(Tier.STANDARD);

private final Tier tier;
Expand All @@ -122,6 +122,8 @@ public static StorageClass fromTier(Tier tier) {
switch (tier) {
case STANDARD: return StorageClass.STANDARD;
case INFREQUENT: return StorageClass.NEARLINE;
case COOL: return StorageClass.NEARLINE;
case COLD: return StorageClass.COLDLINE;
case ARCHIVE: return StorageClass.ARCHIVE;
}
throw new IllegalArgumentException("invalid tier: " + tier);
Expand Down
Loading