import { CacheDecreaseTtl, CacheDelete, CacheDictionaryFetch, CacheDictionaryGetField, CacheDictionaryGetFields, CacheDictionaryIncrement, CacheDictionaryLength, CacheDictionaryRemoveField, CacheDictionaryRemoveFields, CacheDictionarySetField, CacheDictionarySetFields, CacheGet, CacheGetBatch, CacheGetWithHash, CacheIncreaseTtl, CacheIncrement, CacheItemGetTtl, CacheItemGetType, CacheKeyExists, CacheKeysExist, CacheListConcatenateBack, CacheListConcatenateFront, CacheListFetch, CacheListLength, CacheListPopBack, CacheListPopFront, CacheListPushBack, CacheListPushFront, CacheListRemoveValue, CacheListRetain, CacheSet, CacheSetWithHash, CacheSetAddElements, CacheSetBatch, CacheSetContainsElement, CacheSetContainsElements, CacheSetFetch, CacheSetIfAbsent, CacheSetIfAbsentOrEqual, CacheSetIfEqual, CacheSetIfNotEqual, CacheSetIfNotExists, CacheSetIfPresent, CacheSetIfPresentAndNotEqual, CacheSetIfPresentAndHashEqual, CacheSetIfPresentAndHashNotEqual, CacheSetIfAbsentOrHashEqual, CacheSetIfAbsentOrHashNotEqual, CacheSetRemoveElements, CacheSetSample, CacheSortedSetFetch, CacheSortedSetGetRank, CacheSortedSetGetScore, CacheSortedSetGetScores, CacheSortedSetIncrementScore, CacheSortedSetLength, CacheSortedSetLengthByScore, CacheSortedSetPutElement, CacheSortedSetPutElements, CacheSortedSetRemoveElement, CacheSortedSetRemoveElements, CacheSortedSetUnionStore, CacheUpdateTtl, CollectionTtl, SortedSetOrder } from '..'; import { Semaphore } from '@gomomento/sdk-core/dist/src/internal/utils'; import { IDataClient } from '@gomomento/sdk-core/dist/src/internal/clients'; import { CacheClientAllProps } from './cache-client-all-props'; import { GetBatchCallOptions, GetCallOptions, SetBatchCallOptions, SetBatchItem, SetCallOptions, SetIfAbsentCallOptions, SortedSetSource, SortedSetAggregate, GetWithHashCallOptions, SetWithHashCallOptions } from '@gomomento/sdk-core/dist/src/utils'; import { CacheSetLength, CacheSetPop } from '@gomomento/sdk-core'; export declare const CONNECTION_ID_KEY: unique symbol; export declare class CacheDataClient implements IDataClient { private readonly clientWrapper; private readonly textEncoder; private readonly configuration; private readonly credentialProvider; private readonly defaultTtlSeconds; private readonly requestTimeoutMs; private static readonly DEFAULT_REQUEST_TIMEOUT_MS; private readonly logger; private readonly cacheServiceErrorMapper; private readonly interceptors; private readonly streamingInterceptors; private readonly compressionDetails?; private readonly requestConcurrencySemaphore; /** * @param {CacheClientProps} props * @param dataClientID * @param semaphore */ constructor(props: CacheClientAllProps, dataClientID: string, semaphore: Semaphore | undefined); close(): void; connect(timeoutSeconds?: number): Promise; private connectionStateToString; private connectWithinDeadline; getEndpoint(): string; private validateRequestTimeout; private convertECacheResult; private convertItemTypeResult; private convertAggregateResult; private convertSortedSetSource; private rateLimited; /** * Returns the TTL in milliseconds for a collection. * If the provided TTL is not set, it defaults to the instance's default TTL. * @param ttl - The CollectionTttl object containing the TTL value. * @returns The TTL in milliseconds. */ private collectionTtlOrDefaultMilliseconds; /** * Returns the TTL in milliseconds. * If the provided TTL is not set, it defaults to the instance's default TTL. * @param ttl * @returns The TTL in milliseconds. */ private ttlOrDefaultMilliseconds; set(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, options?: SetCallOptions): Promise; private sendSet; setWithHash(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, options?: SetWithHashCallOptions): Promise; private sendSetWithHash; setFetch(cacheName: string, setName: string, abortSignal?: AbortSignal): Promise; private sendSetFetch; setAddElements(cacheName: string, setName: string, elements: string[] | Uint8Array[], ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendSetAddElements; setContainsElement(cacheName: string, setName: string, element: string | Uint8Array, abortSignal?: AbortSignal): Promise; private sendSetContainsElement; setContainsElements(cacheName: string, setName: string, elements: string[] | Uint8Array[], abortSignal?: AbortSignal): Promise; private sendSetContainsElements; setRemoveElements(cacheName: string, setName: string, elements: string[] | Uint8Array[], abortSignal?: AbortSignal): Promise; private sendSetRemoveElements; setSample(cacheName: string, setName: string, limit: number, abortSignal?: AbortSignal): Promise; private sendSetSample; setPop(cacheName: string, setName: string, count: number, abortSignal?: AbortSignal): Promise; private sendSetPop; setLength(cacheName: string, setName: string, abortSignal?: AbortSignal): Promise; private sendSetLength; setIfNotExists(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfNotExists; setIfAbsent(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, options?: SetIfAbsentCallOptions): Promise; private sendSetIfAbsent; setIfPresent(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfPresent; setIfEqual(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, equal: string | Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfEqual; setIfNotEqual(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, notEqual: string | Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfNotEqual; setIfPresentAndNotEqual(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, notEqual: string | Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfPresentAndNotEqual; setIfAbsentOrEqual(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, equal: string | Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfAbsentOrEqual; setIfPresentAndHashEqual(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, hashEqual: Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfPresentAndHashEqual; setIfPresentAndHashNotEqual(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, hashNotEqual: Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfPresentAndHashNotEqual; setIfAbsentOrHashEqual(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, hashEqual: Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfAbsentOrHashEqual; setIfAbsentOrHashNotEqual(cacheName: string, key: string | Uint8Array, value: string | Uint8Array, hashNotEqual: Uint8Array, ttl?: number, abortSignal?: AbortSignal): Promise; private sendSetIfAbsentOrHashNotEqual; delete(cacheName: string, key: string | Uint8Array, abortSignal?: AbortSignal): Promise; private sendDelete; get(cacheName: string, key: string | Uint8Array, options?: GetCallOptions): Promise; private sendGet; getWithHash(cacheName: string, key: string | Uint8Array, options?: GetWithHashCallOptions): Promise; private sendGetWithHash; getBatch(cacheName: string, keys: Array, options?: GetBatchCallOptions): Promise; private sendGetBatch; setBatch(cacheName: string, items: Record | Map | Array, options?: SetBatchCallOptions): Promise; private sendSetBatch; listConcatenateBack(cacheName: string, listName: string, values: string[] | Uint8Array[], truncateFrontToSize?: number, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendListConcatenateBack; listConcatenateFront(cacheName: string, listName: string, values: string[] | Uint8Array[], truncateBackToSize?: number, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendListConcatenateFront; listFetch(cacheName: string, listName: string, startIndex?: number, endIndex?: number, abortSignal?: AbortSignal): Promise; private sendListFetch; listRetain(cacheName: string, listName: string, startIndex?: number, endIndex?: number, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendListRetain; listLength(cacheName: string, listName: string, abortSignal?: AbortSignal): Promise; private sendListLength; listPopBack(cacheName: string, listName: string, abortSignal?: AbortSignal): Promise; private sendListPopBack; listPopFront(cacheName: string, listName: string, abortSignal?: AbortSignal): Promise; private sendListPopFront; listPushBack(cacheName: string, listName: string, value: string | Uint8Array, truncateFrontToSize?: number, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendListPushBack; listPushFront(cacheName: string, listName: string, value: string | Uint8Array, truncateBackToSize?: number, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendListPushFront; listRemoveValue(cacheName: string, listName: string, value: string | Uint8Array, abortSignal?: AbortSignal): Promise; private sendListRemoveValue; dictionaryFetch(cacheName: string, dictionaryName: string, abortSignal?: AbortSignal): Promise; private sendDictionaryFetch; dictionarySetField(cacheName: string, dictionaryName: string, field: string | Uint8Array, value: string | Uint8Array, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendDictionarySetField; dictionarySetFields(cacheName: string, dictionaryName: string, elements: Map | Record | Array<[string, string | Uint8Array]>, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendDictionarySetFields; dictionaryGetField(cacheName: string, dictionaryName: string, field: string | Uint8Array, abortSignal?: AbortSignal): Promise; private sendDictionaryGetField; dictionaryGetFields(cacheName: string, dictionaryName: string, fields: string[] | Uint8Array[], abortSignal?: AbortSignal): Promise; private sendDictionaryGetFields; dictionaryRemoveField(cacheName: string, dictionaryName: string, field: string | Uint8Array, abortSignal?: AbortSignal): Promise; private sendDictionaryRemoveField; dictionaryRemoveFields(cacheName: string, dictionaryName: string, fields: string[] | Uint8Array[], abortSignal?: AbortSignal): Promise; private sendDictionaryRemoveFields; dictionaryLength(cacheName: string, dictionaryName: string, abortSignal?: AbortSignal): Promise; private sendDictionaryLength; increment(cacheName: string, field: string | Uint8Array, amount?: number, ttl?: number, abortSignal?: AbortSignal): Promise; private sendIncrement; dictionaryIncrement(cacheName: string, dictionaryName: string, field: string | Uint8Array, amount?: number, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendDictionaryIncrement; sortedSetPutElement(cacheName: string, sortedSetName: string, value: string | Uint8Array, score: number, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendSortedSetPutElement; sortedSetPutElements(cacheName: string, sortedSetName: string, elements: Map | Record | Array<[string, number]>, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendSortedSetPutElements; sortedSetFetchByRank(cacheName: string, sortedSetName: string, order: SortedSetOrder, startRank: number, endRank?: number, abortSignal?: AbortSignal): Promise; private sendSortedSetFetchByRank; sortedSetFetchByScore(cacheName: string, sortedSetName: string, order: SortedSetOrder, minScore?: number, maxScore?: number, offset?: number, count?: number, abortSignal?: AbortSignal): Promise; private sendSortedSetFetchByScore; sortedSetGetRank(cacheName: string, sortedSetName: string, value: string | Uint8Array, order?: SortedSetOrder, abortSignal?: AbortSignal): Promise; private sendSortedSetGetRank; sortedSetGetScore(cacheName: string, sortedSetName: string, value: string | Uint8Array, abortSignal?: AbortSignal): Promise; sortedSetGetScores(cacheName: string, sortedSetName: string, values: string[] | Uint8Array[], abortSignal?: AbortSignal): Promise; private sendSortedSetGetScores; sortedSetIncrementScore(cacheName: string, sortedSetName: string, value: string | Uint8Array, amount?: number, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendSortedSetIncrementScore; sortedSetRemoveElement(cacheName: string, sortedSetName: string, value: string | Uint8Array, abortSignal?: AbortSignal): Promise; private sendSortedSetRemoveElement; sortedSetRemoveElements(cacheName: string, sortedSetName: string, values: string[] | Uint8Array[], abortSignal?: AbortSignal): Promise; private sendSortedSetRemoveElements; sortedSetLength(cacheName: string, sortedSetName: string, abortSignal?: AbortSignal): Promise; private sendSortedSetLength; sortedSetLengthByScore(cacheName: string, sortedSetName: string, minScore?: number, maxScore?: number, abortSignal?: AbortSignal): Promise; private sendSortedSetLengthByScore; sortedSetUnionStore(cacheName: string, sortedSetName: string, sources: SortedSetSource[], aggregate?: SortedSetAggregate, ttl?: CollectionTtl, abortSignal?: AbortSignal): Promise; private sendSortedSetUnionStore; private initializeInterceptors; private initializeStreamingInterceptors; private convert; private convertArray; private convertElements; private convertSortedSetMapOrRecord; private convertSetBatchElements; itemGetType(cacheName: string, key: string | Uint8Array, abortSignal?: AbortSignal): Promise; private sendItemGetType; itemGetTtl(cacheName: string, key: string | Uint8Array, abortSignal?: AbortSignal): Promise; private sendItemGetTtl; keyExists(cacheName: string, key: string | Uint8Array, abortSignal?: AbortSignal): Promise; private sendKeyExists; updateTtl(cacheName: string, key: string | Uint8Array, ttlMilliseconds: number, abortSignal?: AbortSignal): Promise; private sendUpdateTtl; keysExist(cacheName: string, keys: string[] | Uint8Array[], abortSignal?: AbortSignal): Promise; private sendKeysExist; increaseTtl(cacheName: string, key: string | Uint8Array, ttlMilliseconds: number, abortSignal?: AbortSignal): Promise; private sendIncreaseTtl; decreaseTtl(cacheName: string, key: string | Uint8Array, ttlMilliseconds: number, abortSignal?: AbortSignal): Promise; private sendDecreaseTtl; private createMetadata; private toSingletonFieldValuePair; private createStreamingInterceptionsWithCancellation; }