import { Concept, Connection } from "../app"; /** * This class is a buffer class that is used to write to the indexdb. We cannot willy nilly write to indexdb because * it will cause the system to crash. We must also in future only allow certain types of concepts and connections * to be stored because a large indexdb is more problem than a blessing. */ export declare class IndexDbUpdate { static concepts: Concept[]; static connections: Connection[]; /** * This is the maximum number of concepts or connections that needs to be in the buffer before flusing them * to index db */ static INDEX_DB_BUFFER_MAX: number; /** * This means that indexdb is in use. */ static IN_USE: boolean; /** * This is a delay that you introduce between two updates to indexdb. */ static DELAY_BETWEEN_INDEX_UPDATES: number; /** * This is a varaible that defines how many times a concept or connection should be used before putting * it to indexdb. */ static MIN_USE_FOR_INDEX_DB: number; /** * This is a variable that defines that any concept / connection with count greater than this should not * be added to indexdb because probably this already is in the indexdb. */ static MAX_USE_FOR_INDEX_DB: number; /** * This function holds the buffer to the indexdb. Only things that pass through here can be stored to the indexdb * This function holds the concepts in the buffer and puts them in indexdb once the INDEX_DB_BUFFER_MAX is exceeded. * @param concept Concept that needs to be passed on to the indexdb * */ static UpdateConceptIndexDb(concept: Concept): Promise; /** * This function holds the buffer to the indexdb. Only things that pass through here can be stored to the indexdb * This function holds the connections in the buffer and puts them in indexdb once the INDEX_DB_BUFFER_MAX is exceeded. * @param connection Connection that needs to be passed on to the indexdb * */ static UpdateConnectionIndexDb(connection: Connection): Promise; }