mirror of https://github.com/apache/jclouds.git
JCLOUDS-1635: Add COOL and COLD to Tier
The former replaces INFREQUENT. References gaul/s3proxy#625.
This commit is contained in:
parent
e1f34bbfa7
commit
da1bc06f9e
|
@ -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;
|
||||
|
@ -53,6 +53,8 @@ public interface ObjectMetadata extends Comparable<ObjectMetadata> {
|
|||
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);
|
||||
|
|
|
@ -24,8 +24,12 @@ package org.jclouds.blobstore.domain;
|
|||
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.
|
||||
|
|
|
@ -24,8 +24,8 @@ import com.google.common.base.CaseFormat;
|
|||
|
||||
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;
|
||||
|
@ -52,6 +52,8 @@ public enum AccessTier {
|
|||
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);
|
||||
|
|
|
@ -105,11 +105,11 @@ public final class DomainResourceReferences {
|
|||
|
||||
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;
|
||||
|
@ -122,6 +122,8 @@ public final class DomainResourceReferences {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue