SpaceClear Method |
Name | Description | |
---|---|---|
![]() | Clear |
Deletes all tuples in the Space. Equivalent to Clear("")
|
![]() | Clear(String) |
Deletes from the Space the tuples that match the specified filter on a "best effort" basis.
If no filter is specified, all tuples are deleted.
This operation does not block other space operations while it is ongoing, so if other clients
perform write operations on entries already removed but before the clear finishes, it might be
the case that the space contains tuples that match the filter after the clear completes. Thus,
it is up to the application to synchronize its clients to guarantee that no write operations
happen while the clear is ongoing if the intent is to clear all entries present in the space at the
time clear is invoked.
Persistence behaviour
When share-all persistence is used, this method does not trigger onWrite callbacks.
It is user's responsibility to perform clear on the back-end database.
When share-nothing persistence is used, the in memory space data is kept synchronized with
the persistence files and entries are removed from file as well.
Listener behaviour
Listeners do not get callbacks for takes performed along with clear execution.
|