public class CdsDataStoreLookup extends Object
CdsDataStoreConnectors. For performance reasons CdsDataStore
connector instances are cached per tenant. The cache is synchronized with the MetaDataAccessor's cache:
cache CdsDataStore entries are automatically refreshed when a cached model changes in
the MetaDataAccessor's cache. To manually refresh a CdsDataStore
for a particular tenant the tenant's model must be refreshed or evicted at the MetaDataAccessor.| Constructor and Description |
|---|
CdsDataStoreLookup(CdsDataStoreConnectorCreator cdsDataStoreConnectorCreator,
BiPredicate<String,CdsModel> isModelOutDated,
CacheParams cacheParams,
com.google.common.base.Ticker cacheTicker) |
| Modifier and Type | Method and Description |
|---|---|
void |
evictIfOutDated(String tenantId) |
CdsDataStoreConnector |
getCdsDataStoreConnector(String tenantId)
Determine a data store connector for a tenant
|
public CdsDataStoreLookup(CdsDataStoreConnectorCreator cdsDataStoreConnectorCreator, BiPredicate<String,CdsModel> isModelOutDated, CacheParams cacheParams, com.google.common.base.Ticker cacheTicker)
cdsDataStoreConnectorCreator - factory that creates a
CdsDataStoreConnectorisModelOutDated - predicate that takes the tenant id and
the current model as input and decides if
the model is out datedcacheParams - Parameters that control cache lifecyclecacheTicker - Optional ticker used by guava cache for
testing purposes, use null for productive
usepublic CdsDataStoreConnector getCdsDataStoreConnector(String tenantId) throws CdsException
tenantId - tenant identifierCdsExceptionpublic void evictIfOutDated(String tenantId)
Copyright © 2020 SAP. All rights reserved.