Class ClientRecordCache<RECORD,UIRECORD extends UiIdentifiableClientRecord>
java.lang.Object
org.teamapps.ux.cache.record.legacy.ClientRecordCache<RECORD,UIRECORD>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Constructor Summary
ConstructorsConstructorDescriptionClientRecordCache(ClientRecordCache.UiIdentifiableClientRecordFactory<RECORD, UIRECORD> clientRecordFactory) ClientRecordCache(ClientRecordCache.UiIdentifiableClientRecordFactory<RECORD, UIRECORD> clientRecordFactory, ClientRecordCache.UiIdentifiableClientRecordPostProcessor<RECORD, UIRECORD> postProcessor) -
Method Summary
Modifier and TypeMethodDescriptionaddRecords(List<RECORD> newRecords) clear()getRecordByClientId(int id) getUiRecordIdOrNull(RECORD record) removeRecord(RECORD record) replaceRecords(List<RECORD> newRecords) Replaces the records, but keeps records inside the cache that are not purged due to thepurgeDecider's intervention.voidsetMaxCapacity(int maxCapacity) voidsetPurgeDecider(BiPredicate<RECORD, Integer> purgeDecider) voidsetPurgeListener(ClientRecordCachePurgeListener purgeListener)
-
Constructor Details
-
ClientRecordCache
public ClientRecordCache(ClientRecordCache.UiIdentifiableClientRecordFactory<RECORD, UIRECORD> clientRecordFactory, ClientRecordCache.UiIdentifiableClientRecordPostProcessor<RECORD, UIRECORD> postProcessor) -
ClientRecordCache
public ClientRecordCache(ClientRecordCache.UiIdentifiableClientRecordFactory<RECORD, UIRECORD> clientRecordFactory)
-
-
Method Details
-
getUiRecordIdOrNull
-
getRecordByClientId
-
clear
-
replaceRecords
Replaces the records, but keeps records inside the cache that are not purged due to thepurgeDecider's intervention. -
addRecords
-
addRecord
-
removeRecord
-
setMaxCapacity
public void setMaxCapacity(int maxCapacity) -
setPurgeListener
-
setPurgeDecider
-