SDMCache

The SDMCache component is responsible for storing and accessing OData related objects in the memory of the device.

List of Features

SDMCache Public APIs

ISDMCache

 void initialize(ISDMPreferences preferences);
	void clear();
 void setSDMODataServiceDocument(ISDMODataServiceDocument serviceDocument);
	void setSDMODataSchema(ISDMODataSchema schema);
	void setSDMODataEntry(ISDMODataEntry entry, String collectionId);
	void setSDMODataEntries(Vector entries, String collectionId);
 ISDMODataServiceDocument getSDMODataServiceDocument();
	ISDMODataSchema getSDMODataSchema();
	ISDMODataEntry getSDMODataEntry(String key);
	Vector getSDMODataEntries(String collectionId);
	Vector getStoredDocuments();
	Vector searchSDMODataEntries(String searchTerm, String collectionId);
	void removeSDMODataServiceDocument();
	void removeSDMODataSchema();
	void removeSDMODataEntry(String key);
	void removeSDMODataEntries(String collectionId);
	void removeStoredDocuments();
 Hashtable getStoreStructureForPersistency();
 void setStoreStructureForPersistency(Hashtable values);

Technical Details

For capacity management, SDMCache uses an LRU (least recently used) algorithm that ensures that the least recently used entries are removed first because of reaching the maximum capacity. Maximum number of capacity can be set using preference with key: ISDMPreferences.CACHE_MAX_ELEMENT_NR. This setting refers to the maximum number of cached entities per Collection.

SDMCache supports the tokenized prefix search. The gp:use-in-search property tag determines whether a field is searchable.

SDMCache depends on OData specific interfaces of SDMParser, but does not depend on the real implementation of SDMParser.