
Public Member Functions | |
| NSArray<?extends EOEnterpriseObject > | objectsForFetchSpecification (EODatabaseContext dbc, EOEditingContext ec, EOFetchSpecification fs) |
| void | setObjectsForFetchSpecification (EODatabaseContext dbc, EOEditingContext ec, NSArray<?> eos, EOFetchSpecification fs) |
Protected Member Functions | |
| long | cacheTime (NSArray eos, EOFetchSpecification fs) |
| NSArray< String > | excludedEntities () |
Private Attributes | |
| ERXExpiringCache< String, NSArray< EOGlobalID > > | cache |
Static Private Attributes | |
| static EODatabase | currentDatabase |
| static final Logger | log = Logger.getLogger(ERXFetchResultCache.class) |
| long cacheTime | ( | NSArray | eos, | |
| EOFetchSpecification | fs | |||
| ) | [protected] |
Returns the time the result should stay in the cache. Less or equal than zero means don't cache.
| fs |
| NSArray<String> excludedEntities | ( | ) | [protected] |
Returns a list of entities that should not be cached.
| NSArray<? extends EOEnterpriseObject> objectsForFetchSpecification | ( | EODatabaseContext | dbc, | |
| EOEditingContext | ec, | |||
| EOFetchSpecification | fs | |||
| ) |
Returns an array of EOs that where cached for the given fetch specification or null.
| ec | ||
| fs |
| void setObjectsForFetchSpecification | ( | EODatabaseContext | dbc, | |
| EOEditingContext | ec, | |||
| NSArray<?> | eos, | |||
| EOFetchSpecification | fs | |||
| ) |
Registers eos for a given fetch spec.
| ec | ||
| dbc | ||
| eos | ||
| fs |
Initial value:
new ERXExpiringCache<String, NSArray<EOGlobalID>>() { @Override protected synchronized void removeEntryForKey(Entry<NSArray<EOGlobalID>> entry, String key) { for (EOGlobalID gid : entry.object()) { currentDatabase.decrementSnapshotCountForGlobalID(gid); } super.removeEntryForKey(entry, key); } @Override protected synchronized void setEntryForKey(Entry<NSArray<EOGlobalID>> entry, String key) { super.setEntryForKey(entry, key); for (EOGlobalID gid : entry.object()) { currentDatabase.incrementSnapshotCountForGlobalID(gid); } } }
EODatabase currentDatabase [static, private] |
final Logger log = Logger.getLogger(ERXFetchResultCache.class) [static, private] |
1.5.8