PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBRAMCache
Wrapper Class for the IRAMCache interface.
#include <SFBRAMCache.h.hpp>
class SFBRAMCache : public SFBBase;
SFMTYPEDEFWRAPPER(SFBRAMCache)

Inheritance diagram

 Inheritance diagram of SFBRAMCacheClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
O O O O

Reference

BREW API IRamCache

Member

Public Functions
SFCError Add( ACharConstPtr key , SInt32 keyLen , ACharConstPtr value , SInt32 valueLen )
Add a record to the cache.
SFCError Add( SFXAnsiStringConstRef key , SFXAnsiStringConstRef value )
Add a record to the cache.
SFCError Find( ACharConstPtr key , SInt32 keyLen , ACharPtr value , SInt32Ptr valueLen )
Find a record in the cache.
SFCError Find( SFXAnsiStringConstRef key , SFXAnsiStringPtr value )
Find a record in the cache.
SFCError FlushAll( Void )
Empty the cache, all records are removed.
SFCError FlushExpired( Void )
Run expire on the cache. All expired records are removed.
static
SFBRAMCacheSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBRAMCache instance.
static
SFBRAMCacheSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBRAMCache instance.
SFCError Remove( ACharConstPtr key , SInt32 keyLen )
Remove a record from the cache.
SFCError Remove( SFXAnsiStringConstRef key )
Remove a record from the cache.
SInt32 SetMaxEntries( SInt32 num )
Set the maximum number of entries allowed in the cache.
SInt32 SetMaxSize( SInt32 size )
Set the maximum size (in bytes) that the RamCache may consume to hold keys and values.
UInt32 SetTTL( UInt32 ttl )
Set the TTL for records in the cache, in milliseconds.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBRAMCache::Add
Add a record to the cache.
[ public ]
SFCError Add(
    ACharConstPtr key     // the key data 
    SInt32 keyLen         // the length of the key data 
    ACharConstPtr value   // the value data 
    SInt32 valueLen       // the length of the value data 
);
[ public ]
SFCError Add(
    SFXAnsiStringConstRef key     // the key data
    SFXAnsiStringConstRef value   // the value data
);

Reference

BREW API IRAMCACHE_Add


SFBRAMCache::Find
Find a record in the cache.
[ public ]
SFCError Find(
    ACharConstPtr key    // the key data 
    SInt32 keyLen        // the length of the key data 
    ACharPtr value       // the value data 
    SInt32Ptr valueLen   // size of value data, if value is null, valueLen is ignored as input, 
                         // on output, holds the size of the data in the cache (if any)
);
[ public ]
SFCError Find(
    SFXAnsiStringConstRef key   // the key data 
    SFXAnsiStringPtr value      // the value data 
);

Reference

BREW API IRAMCACHE_Find


SFBRAMCache::FlushAll
Empty the cache, all records are removed.
[ public ]
SFCError FlushAll(Void);

Reference

BREW API IRAMCACHE_FlushAll


SFBRAMCache::FlushExpired
Run expire on the cache. All expired records are removed.
[ public ]
SFCError FlushExpired(Void);

Reference

BREW API IRAMCACHE_FlushExpired


SFBRAMCache::NewInstance
Create a new SFBRAMCache instance.
[ public, static ]
SFBRAMCacheSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBRAMCacheSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBRAMCache::Remove
Remove a record from the cache.
[ public ]
SFCError Remove(
    ACharConstPtr key   // the key data 
    SInt32 keyLen       // the length of the key data 
);
[ public ]
SFCError Remove(
    SFXAnsiStringConstRef key   // the key data 
);

Reference

BREW API IRAMCACHE_Remove


SFBRAMCache::SetMaxEntries
Set the maximum number of entries allowed in the cache.
[ public ]
SInt32 SetMaxEntries(
    SInt32 num   // the new entries limit 
);

Reference

BREW API IRAMCACHE_SetMaxEntries


SFBRAMCache::SetMaxSize
Set the maximum size (in bytes) that the RamCache may consume to hold keys and values.
[ public ]
SInt32 SetMaxSize(
    SInt32 size   // the new size, in bytes
);

Reference

BREW API IRAMCACHE_SetMaxSize


SFBRAMCache::SetTTL
Set the TTL for records in the cache, in milliseconds.
[ public ]
UInt32 SetTTL(
    UInt32 ttl   // the new TTL, in milliseconds
);

Reference

BREW API IRAMCACHE_SetTTL