addListener

Registers a listener so it can be informed about changes in map availability.

If the map is already available at the time of calling this, StoreAccessChangedListener.onReadOnlyAccessGranted will be called immediately, before this call returns.

Caller of this function must not hold the same synchronisation primitive (mutex, lock or similar) which will be held inside callbacks inherited from StoreAccessChangedListener. Otherwise, a deadlock may occur!

Parameters

listener

listener to add.

Throws

upon adding the same listener more than once.

upon calling after disposing the object.