abstract const class proj::Watch
Watch is a subscription to a set of records in a folio project. It provides an efficient mechanism to poll for changes. Also see Watches.
Add the given records to this watch. Any ids already subscribed by this watch or not found in the database are silently ignored. Raise exception if watch is closed.
idcolumn of each row. If any row is missing an
idtag then it is silently skipped.
abstract Void close()
Close this watch and unsubscribe all its records. If watch is already closed, this method is a no op.
abstract Str dis()
Debug display string used during
Equality based on reference equality
override Int hash()
abstract Str id()
Identifier which uniquely identifies this watch in the project
abstract Bool isClosed()
Return if this watch has been closed
abstract Duration lastPoll()
Ticks of the last call to
abstract Duration lease
The lease determines the max duration which may elapse without a poll call before the watch is expired. The default is 1min. Clients can attempt to tune the lease time by setting this field, but no guarantee is made that the framework will honor extremely long lease times.
abstract Ref list()
List the rec ids currently subscribed by this watch. Raise exception if watch is closed.
Get all the records which have been modified since the given ticks. An empty list is returned if no changes have been made to the watched records since ticks. There is no ordering to the resulting list. This method automatically updates the
lastPollticks. Also see Watches.
abstract Proj proj()
Project associated with this watch
Remove the given records from this watch. Any ids not currently subscribed by this watch are silently ignored. Raise exception if watch is closed.
idcolumn of each row
override Str toStr()