@flagship.io/js-sdk
Version:
36 lines (35 loc) • 1.35 kB
TypeScript
import { CacheStrategy } from '../enum/index';
export interface ITrackingManagerConfig {
/**
* Define a regular interval in seconds to trigger batch processing
*
* Note:
* - The process will batch all hits from the pool whether poolMaxSize is reached or not
* - Must be between 1sec and 10800s (3hours). Otherwise default value will be applied
*/
batchIntervals?: number;
/**
* Define the minimum number of hits the pool must reach to automatically batch all hits in the pool and send it
*
* Note:
* - Must be greater than 5 otherwise default value will be used
* - Having a large poolMaxSize can lead to performance issues
*/
poolMaxSize?: number;
/**
* Define the strategy that will be used for hit caching
*/
cacheStrategy?: CacheStrategy;
}
export declare class TrackingManagerConfig implements ITrackingManagerConfig {
private _batchIntervals;
private _poolMaxSize;
private _batchStrategy;
constructor(param?: ITrackingManagerConfig);
protected getCacheStrategy(cacheStrategy?: CacheStrategy): CacheStrategy;
get batchIntervals(): number | undefined;
set batchIntervals(v: number | undefined);
get poolMaxSize(): number | undefined;
set poolMaxSize(v: number | undefined);
get cacheStrategy(): CacheStrategy;
}