Configuration options for initializing a CassandraKVStore. These options extend generic Cassandra client arguments with specific settings for key-value store operations.

CassandraKVOptions

interface CassandraKVOptions {
    keyspace: string;
    table: string;
    applicationName?: string;
    applicationVersion?: string;
    authProvider?: AuthProvider;
    cloud?: {
        secureConnectBundle: string | URL;
    };
    contactPoints?: string[];
    credentials?: {
        password: string;
        username: string;
    };
    encoding?: {
        copyBuffer?: boolean;
        map?: Function;
        set?: Function;
        useBigIntAsLong?: boolean;
        useBigIntAsVarint?: boolean;
        useUndefinedAsUnset?: boolean;
    };
    graphOptions?: GraphOptions;
    id?: Uuid;
    isMetadataSyncEnabled?: boolean;
    keyDelimiter?: string;
    localDataCenter?: string;
    maxPrepared?: number;
    metrics?: ClientMetrics;
    monitorReporting?: {
        enabled?: boolean;
    };
    policies?: {
        addressResolution?: AddressTranslator;
        loadBalancing?: LoadBalancingPolicy;
        reconnection?: ReconnectionPolicy;
        retry?: RetryPolicy;
        speculativeExecution?: SpeculativeExecutionPolicy;
        timestampGeneration?: TimestampGenerator;
    };
    pooling?: {
        coreConnectionsPerHost?: {
            [key: number]: number;
        };
        heartBeatInterval?: number;
        maxRequestsPerConnection?: number;
        warmup?: boolean;
    };
    prepareOnAllHosts?: boolean;
    profiles?: ExecutionProfile[];
    promiseFactory?: ((handler: ((callback: ((err: Error, result?: any) => void)) => void)) => Promise<any>);
    protocolOptions?: {
        maxSchemaAgreementWaitSeconds?: number;
        maxVersion?: number;
        noCompact?: boolean;
        port?: number;
    };
    queryOptions?: QueryOptions;
    rePrepareOnUp?: boolean;
    refreshSchemaDelay?: number;
    requestTracker?: RequestTracker;
    serviceProviderArgs?: CassandraServiceProviderArgs;
    socketOptions?: {
        coalescingThreshold?: number;
        connectTimeout?: number;
        defunctReadTimeoutThreshold?: number;
        keepAlive?: boolean;
        keepAliveDelay?: number;
        readTimeout?: number;
        tcpNoDelay?: boolean;
    };
    sslOptions?: ConnectionOptions;
}

Hierarchy (view full)

Properties

keyspace: string

The name of the Cassandra keyspace to be used by the key-value store. The keyspace must exist.

table: string

The name of the table within the specified keyspace dedicated to storing key-value pairs. The table will be created if it does not exist.

applicationName?: string
applicationVersion?: string
authProvider?: AuthProvider
cloud?: {
    secureConnectBundle: string | URL;
}
contactPoints?: string[]
credentials?: {
    password: string;
    username: string;
}
encoding?: {
    copyBuffer?: boolean;
    map?: Function;
    set?: Function;
    useBigIntAsLong?: boolean;
    useBigIntAsVarint?: boolean;
    useUndefinedAsUnset?: boolean;
}
graphOptions?: GraphOptions
id?: Uuid
isMetadataSyncEnabled?: boolean
keyDelimiter?: string

An optional delimiter used to structure complex keys. Defaults to '/'. This delimiter is used for parsing complex keys (e.g., hierarchical keys) when performing operations that involve key prefixes or segmentation.

localDataCenter?: string
maxPrepared?: number
metrics?: ClientMetrics
monitorReporting?: {
    enabled?: boolean;
}
policies?: {
    addressResolution?: AddressTranslator;
    loadBalancing?: LoadBalancingPolicy;
    reconnection?: ReconnectionPolicy;
    retry?: RetryPolicy;
    speculativeExecution?: SpeculativeExecutionPolicy;
    timestampGeneration?: TimestampGenerator;
}
pooling?: {
    coreConnectionsPerHost?: {
        [key: number]: number;
    };
    heartBeatInterval?: number;
    maxRequestsPerConnection?: number;
    warmup?: boolean;
}
prepareOnAllHosts?: boolean
profiles?: ExecutionProfile[]
promiseFactory?: ((handler: ((callback: ((err: Error, result?: any) => void)) => void)) => Promise<any>)
protocolOptions?: {
    maxSchemaAgreementWaitSeconds?: number;
    maxVersion?: number;
    noCompact?: boolean;
    port?: number;
}
queryOptions?: QueryOptions
rePrepareOnUp?: boolean
refreshSchemaDelay?: number
requestTracker?: RequestTracker
serviceProviderArgs?: CassandraServiceProviderArgs
socketOptions?: {
    coalescingThreshold?: number;
    connectTimeout?: number;
    defunctReadTimeoutThreshold?: number;
    keepAlive?: boolean;
    keepAliveDelay?: number;
    readTimeout?: number;
    tcpNoDelay?: boolean;
}
sslOptions?: ConnectionOptions