/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
/**
 * The stable/default version of GC Data
 */
export const stableGCVersion = 3;
/**
 * The next version of GC Data, to bump to in case we need to regenerate all GC Data across all files.
 */
export const nextGCVersion = 4;
/**
 * This undocumented GC Option (on ContainerRuntime Options) allows configuring which documents can have Sweep enabled.
 * This provides a way to disable both Tombstone Enforcement and Sweep.
 *
 * If unset, Tombstone Enforcement + Sweep will operate as otherwise configured.
 * Otherwise, the Sweep Phase will be disabled for documents where persisted value doesn't match what is passed into this session.
 * This provides a way to disallow Sweep for old documents that may be too difficult for an app to repair,
 * in case a bug is found that violates GC's assumptions.
 *
 * @see GCFeatureMatrix (gcGeneration)
 */
export const gcGenerationOptionName = "gcGeneration";
/**
 * Config key to turn GC test mode on / off.
 */
export const gcTestModeKey = "Fluid.GarbageCollection.GCTestMode";
/**
 * Config key to expire a session after a set period of time. Defaults to true.
 */
export const runSessionExpiryKey = "Fluid.GarbageCollection.RunSessionExpiry";
/**
 * Config key to disable throwing an error when tombstone object is loaded (requested).
 */
export const disableThrowOnTombstoneLoadKey = "Fluid.GarbageCollection.DisableThrowOnTombstoneLoad";
/**
 * Config key to enable GC version upgrade.
 */
export const gcVersionUpgradeToV4Key = "Fluid.GarbageCollection.GCVersionUpgradeToV4";
// One day in milliseconds.
export const oneDayMs = 1 * 24 * 60 * 60 * 1000;
/**
 * The maximum snapshot cache expiry in the driver. This is used to calculate the tombstone timeout.
 * Tombstone timeout = session expiry timeout + snapshot cache expiry timeout + a buffer.
 * The snapshot cache expiry timeout cannot be known precisely but the upper bound is 5 days, i.e., any snapshot
 * in cache will be invalidated before 5 days.
 */
export const maxSnapshotCacheExpiryMs = 5 * oneDayMs;
export const defaultInactiveTimeoutMs = 7 * oneDayMs; // 7 days
export const defaultSessionExpiryDurationMs = 30 * oneDayMs; // 30 days
export const defaultSweepGracePeriodMs = 1 * oneDayMs; // 1 day
/**
 * The types of GC nodes in the GC reference graph.
 * @internal
 */
export const GCNodeType = {
    // Nodes that are for data stores.
    DataStore: "DataStore",
    // Nodes that are within a data store. For example, DDS nodes.
    SubDataStore: "SubDataStore",
    // Nodes that are for attachment blobs, i.e., blobs uploaded via BlobManager.
    Blob: "Blob",
    // Nodes that are neither of the above. For example, root node.
    Other: "Other",
};
/**
 * The type of a garbage collection message.
 * @internal
 */
export const GarbageCollectionMessageType = {
    /**
     * Message sent directing GC to delete the given nodes
     */
    Sweep: "Sweep",
    /**
     * Message sent notifying GC that a Tombstoned object was Loaded
     */
    TombstoneLoaded: "TombstoneLoaded",
};
/**
 * The state of node that is unreferenced.
 */
export const UnreferencedState = {
    /**
     * The node is active, i.e., it can become referenced again.
     */
    Active: "Active",
    /**
     * The node is inactive, i.e., it should not become referenced.
     */
    Inactive: "Inactive",
    /**
     * The node is ready to be tombstoned
     */
    TombstoneReady: "TombstoneReady",
    /**
     * The node is ready to be deleted by the sweep phase.
     */
    SweepReady: "SweepReady",
};
//# sourceMappingURL=gcDefinitions.js.map