YMKStorageManager
class YMKStorageManager : NSObject |
Storage manager. This is a manager that controls temporary cache storages (for example map tiles).
Summary
Instance methods
func addStorageErrorListenerWith( errorListener: YMKStorageErrorListener_) |
func removeStorageErrorListenerWith( errorListener: YMKStorageErrorListener_) |
func computeSize(sizeCallback: @escaping YMKStorageManagerSizeCallback) |
func clear(clearCallback: @escaping YMKStorageManagerClearCallback) |
func setMaxTileStorageSizeWithLimit(_ limit: Int64, |
func resetMaxTileStorageSize(sizeCallback: @escaping YMKStorageManagerSizeCallback) |
func maxTileStorageSize(sizeCallback: @escaping YMKStorageManagerSizeCallback) |
Properties
var isValid: Bool { get } |
Instance methods
addStorageErrorListenerWith(_:)
func addStorageErrorListenerWith( errorListener: YMKStorageErrorListener_) |
Subscribes to storage events.
The class does not retain the object in the 'errorListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removeStorageErrorListenerWith(_:)
func removeStorageErrorListenerWith( errorListener: YMKStorageErrorListener_) |
Unsubscribes from storage events.
computeSize(sizeCallback:)
func computeSize(sizeCallback: @escaping YMKStorageManagerSizeCallback) |
Computes storage size in bytes.
clear(clearCallback:)
func clear(clearCallback: @escaping YMKStorageManagerClearCallback) |
Removes all data.
setMaxTileStorageSizeWithLimit(_:sizeCallback:)
func setMaxTileStorageSizeWithLimit(_ limit: Int64, |
Sets the maximum tile cache size to limit bytes. When the limit is reached, old tiles are removed.
resetMaxTileStorageSize(sizeCallback:)
func resetMaxTileStorageSize(sizeCallback: @escaping YMKStorageManagerSizeCallback) |
Resets the tile cache size limit.
maxTileStorageSize(sizeCallback:)
func maxTileStorageSize(sizeCallback: @escaping YMKStorageManagerSizeCallback) |
Obtains the current storage size limit in bytes.
Properties
isValid
var isValid: Bool { get } |
Tells if this object is valid or no. Any method called on an invalid object will throw an exception. The object becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.