All Products
Search
Document Center

Storage types

Last Updated: May 24, 2021

Android storage types

Datacenter component for Android client provides the following persistent storage solutions:

  • Database storage: Provide the capability of encrypting database underlayer based on OrmLite architecture.
  • Key-value pair storage: Do some wrapping based on Android native SharedPreferences to improve the usability.
  • File storage: Based on Android native File, provide file encryption capability.

iOS storage types

Datacenter component for iOS client provides the following persistent storage solutions:

  • APDataCenter: The entrance class for Datacenter
  • KV storage: Provide interface storage, and simplify the complexity of client-side persistent objects.
  • DAO storage: When sqlite access is necessary for business, you can use the DAO function of Datacenter to simplify and encapsulate.
  • LRU storage: Provide the storage methods of memory cache and disk cache.
  • Custom storage: Provide APCustomStorage storage, APAsyncFileArrayService storage, APObjectArrayService storage, and other custom storage methods.
  • Data cleaning: Create a cache directory that can automatically maintain the capacity, and provide the implementation class for cleaning cache.

Instructions on relevant public classes are as follows:

Class name Function
APDataCenter Singleton class, entrance class for Datacenter
APSharedPreferences This class corresponds to a database file, provides a Key-Value storage interface, and contains DAO tables.
APDataCrypt Symmetric encryption structure
APLRUDiskCache The disk cache that supports LRU elimination rule
APLRUMemoryCache The memory cache that supports LRU elimination rule, which is thread-safe
APObjectArrayService Based on DAO, this class can persist the objects that support NSCoding by business, and supports encryption, capacity limitation and memory cache.
APAsyncFileArrayService Based on DAO, this class can persist binary data, and supports encryption, capacity limitation and memory cache.
APCustomStorage Customize storage space, and provide complete user management, Key-Value and DAO storage in this space.
APDAOProtocol Describe the interfaces that are supported by DAO objects.