Package org.evrete.api.spi
Interface SharedBetaFactStorage
public interface SharedBetaFactStorage
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSharedBetaFactStorage.Scope -
Method Summary
Modifier and Type Method Description voidclear()voidclearDeletedKeys()booleandelete(RuntimeFact fact)SharedBetaFactStorage.Scopedelta()voidensureDeltaCapacity(int insertCount)booleanhasDeletedKeys()booleaninsert(RuntimeFact fact)The method first reads the fact's key (values of specific fields) and checks if any of main and delta repositories contain such a key.voidinsertDirect(RuntimeFact fact)This method reads fact's key (values of specific fields) and saves the object under this key directly in the main repository.booleanisKeyDeleted(ValueRow row)SharedBetaFactStorage.Scopemain()voidmergeDelta()
-
Method Details
-
ensureDeltaCapacity
void ensureDeltaCapacity(int insertCount) -
delete
-
insert
The method first reads the fact's key (values of specific fields) and checks if any of main and delta repositories contain such a key. If they don't, a new key will be created in the delta repository, the fact will be stored there under this key, and the method will return true. If the key is already known, the fact will be appended to the corresponding repository, and the method will return false.
- Parameters:
fact- fact to process- Returns:
- true if the fact's field values (the storage key) are unknown to either delta and main scopes
-
insertDirect
This method reads fact's key (values of specific fields) and saves the object under this key directly in the main repository.
- Parameters:
fact- fact to insert
-
mergeDelta
void mergeDelta() -
clearDeletedKeys
void clearDeletedKeys() -
hasDeletedKeys
boolean hasDeletedKeys() -
isKeyDeleted
-
delta
SharedBetaFactStorage.Scope delta() -
main
SharedBetaFactStorage.Scope main() -
clear
void clear()
-