CCustomResolverCache Class Reference
class CCustomResolverCache : public CTimer
|
Handles caching custom resolvers
Constructor & Destructor Documentation
CCustomResolverCache(TUint32)
CCustomResolverCache
|
(
|
TUint32
|
aCacheSize
|
)
|
[private]
|
Parameters
TUint32
aCacheSize
|
Maximum number of entries allowed to cache.
|
~CCustomResolverCache()
~CCustomResolverCache
|
(
|
)
|
[virtual]
|
Member Functions Documentation
CacheLookup(const TUid, TProxyNewLPtr &)
Search for a resolverUID. If found, return the NewL pointer and update time to live of the entry.
-
Post-condition
-
If cache hit, the timestamp of the entry is updated.
Parameters
const
TUid
aResolverUid
|
the resolver to lookup
|
TProxyNewLPtr
& aNewLFuncPtr
|
output parameter. If lookup successful it has the function pointer to instantiate the resolver.
|
CacheResolver(const TUid, RLibrary, TProxyNewLPtr, TUint32)
Add a resolver library to cache
Parameters
const
TUid
aResolverUid
|
Implementation UID of the resolver.
|
RLibrary
aLib
|
The RLibrary object which has the resolver loaded. The handle of the RLibrary is owned by the cache if call is successful.
|
TProxyNewLPtr
aNewL
|
value for the iNewLFuncPtr member data of RResolverCacheEntry.
|
TUint32
aFlags
|
value for the iFlags member data of RResolverCacheEntry.
|
CachingEnabled()
TBool
|
CachingEnabled
|
(
|
)
|
const
|
Check if both queue size and cache timeout are non zero
ConstructL(TUint32)
void
|
ConstructL
|
(
|
TUint32
|
aCacheTimeout
|
)
|
[private]
|
Standard two phase construction to complete construction of the
CCustomResolverCache
object.
-
leave
-
Any of the system wide error codes.
Parameters
TUint32
aCacheTimeout
|
Cache timeout in microseconds.
|
EvictLeastRecentlyUsed()
void
|
EvictLeastRecentlyUsed
|
(
|
)
|
[private]
|
evict the least recently used entry in cache
FindResolver(const TUid)
TInt
|
FindResolver
|
(
|
const
TUid
|
aResolverUid
|
)
|
const [private]
|
Search of a resolver UID in cache
Parameters
const
TUid
aResolverUid
|
the resolver to search for.
|
NewL(TUint32, TUint32)
Parameters
TUint32
aCacheSize
|
Maximum number of entries allowed to cache.
|
TUint32
aCacheTimeout
|
Cache timeout in microseconds.
|
Remove(const TUid)
Remove a resolver from cache.
Parameters
const
TUid
aResolverUid
|
Identify the resolver to remove.
|
Remove(TInt)
void
|
Remove
|
(
|
TInt
|
aIndex
|
)
|
[private]
|
Parameters
TInt
aIndex
|
position of entry in the array.
|
RemoveItemsWithFlags(TUint32)
void
|
RemoveItemsWithFlags
|
(
|
TUint32
|
aMask
|
)
|
|
Remove cached entries with flags set.
Parameters
TUint32
aMask
|
If an entry has any of the bits in aMask set, it is removed.
|
RunL()
void
|
RunL
|
(
|
)
|
[private, virtual]
|
Implement the
CActive
RunL pure virtual
SetLastUseTime(RResolverCacheEntry &)
Set the iLastUse field and iLruRank field of the entry. The iLruRank field serves as tie breaker when two entries are added within the same tick period.
Member Data Documentation
TUint
iEntryTimeToLive
TUint
|
iEntryTimeToLive
|
[private]
|
cache timeout value. Unit is number of system ticks
TUint32
iMaxCacheSize
max. number of entries allowed in iResolvers
TUint
iMostRecentTimestamp
TUint
|
iMostRecentTimestamp
|
[private]
|
Keep track of youngest timestamp of cache entries. Use to detect if two entries have same timestamp.
RArray< RResolverCacheEntry > iResolvers
TInt
iSystemTickPeriod
TInt
|
iSystemTickPeriod
|
[private]
|
Store the system tick period as member data to avoid having to invoke
HAL::Get()
repeatedly.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.