Deprecated. since 3.0, Use Cache The SDMCache component is responsible for storing and accessing OData related objects in the memory of the device.
com.sap.mobile.lib.sdmcache
public class SDMCache implements ISDMCache, ISDMPreferenceChangeListener, ISDMEntrySearch
All members of SDMCache, including inherited members.
VariablesModifier and Type | Variable | Description |
---|---|---|
public static final String | ALL_ENTRY_SEARCH_TERM | |
protected static final String | ENTRY_TYPE_ODATASBASEDOCUMENT | Search property tag to be used In the default cache search algorithm, this tag will be checked to identify the fields which are included in the search. If configured to be an empty string, all fields are included. |
protected static final String | ENTRY_TYPE_ODATAENTRY | |
protected static final String | ENTRY_KEY_ODATASERVICEDOCUMENT | |
protected static final String | ENTRY_KEY_ODATASCHEMA | |
protected static final String | NON_SAPDATA_DOCUMENTS_HASHMAP_KEY | |
protected ISDMLogger | logger | Logger object. |
protected String | mLogTag | |
protected ISDMEntrySearch | entrySearch | |
protected ISDMPreferences | preferences | |
protected int | cacheCapacity | |
protected int | maxSearchResult | |
protected String | searchField | |
protected int | searchAlgorythm | |
protected long | mPerformanceTime | |
protected long | mTimerStart | |
protected HashMap< String, Map< String, ISDMParserDocument > > | collectionStore | |
protected ISDMODataServiceDocument | serviceDocument | |
protected ISDMODataSchema | schema |
Modifier and Type | Constructor | Description |
---|---|---|
public | SDMCache(ISDMPreferences, ISDMLogger) | |
public | SDMCache(ISDMPreferences, ISDMLogger, ISDMODataServiceDocument, ISDMODataSchema) |
Modifier and Type | Member | Description |
---|---|---|
public void | read(BufferedReader) | |
public void | write(BufferedWriter) |
Technical Details: For capacity management, SDMCache uses an LRU (least recently used) like algorithm that ensures that the most recently used entries are not removed first because of reaching the maximum capacity. SDMCache currently supports only the tokenized prefix search as stated above. As a future improvement SDMCache is also going to support custom search logic. SDMCache is an implementer of the android.os.Parcelable interface provided by Android SDK. SDMCache depends on SAPData specific interfaces of SDMParser but does not depend on the real implementation of SDMParser.