All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.storage.blob.RehydrationStatus Maven / Gradle / Ivy

There is a newer version: 8.6.6
Show newest version
package com.microsoft.azure.storage.blob;

import com.microsoft.azure.storage.core.Utility;

import java.util.Locale;

/**
 * The rehydration status for the blob that is currently archived.
 * Only applicable for block blobs on standard storage accounts for this version.
 */
public enum RehydrationStatus {
    /**
     * The rehydration status is not recognized by this version of the library.
     */
    UNKNOWN,

    /**
     * The blob is being rehydrated to hot storage.
    */
    PENDING_TO_HOT,

    /**
     * The blob is being rehydrated to cool storage.
    **/
    PENDING_TO_COOL;

    /**
     * Parses a rehydration status from the given string.
     *
     * @param rehydrationStatusString
     *        A String which represents the rehydration status to string.
     *
     * @return A RehydrationStatus value that represents the rehydration status of the blob.
     */
    protected static RehydrationStatus parse(final String rehydrationStatusString) {
        if (Utility.isNullOrEmpty(rehydrationStatusString)) {
            return UNKNOWN;
        }
        else if ("rehydrate-pending-to-hot".equals(rehydrationStatusString.toLowerCase(Locale.US))) {
            return PENDING_TO_HOT;
        }
        else if ("rehydrate-pending-to-cool".equals(rehydrationStatusString.toLowerCase(Locale.US))) {
            return PENDING_TO_COOL;
        }
        else {
            return UNKNOWN;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy