diff options
-rw-r--r-- | tooz/drivers/etcd3gw.py | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/tooz/drivers/etcd3gw.py b/tooz/drivers/etcd3gw.py index b1ad633..08f348d 100644 --- a/tooz/drivers/etcd3gw.py +++ b/tooz/drivers/etcd3gw.py @@ -163,7 +163,8 @@ class Etcd3Lock(locking.Lock): return False -class Etcd3Driver(coordination.CoordinationDriverWithExecutor): +class Etcd3Driver(coordination.CoordinationDriverCachedRunWatchers, + coordination.CoordinationDriverWithExecutor): """An etcd based driver. This driver uses etcd provide the coordination driver semantics and @@ -248,18 +249,6 @@ class Etcd3Driver(coordination.CoordinationDriverWithExecutor): lock.heartbeat() return min(self.lock_timeout, self.membership_timeout) - def watch_join_group(self, group_id, callback): - raise tooz.NotImplemented - - def unwatch_join_group(self, group_id, callback): - raise tooz.NotImplemented - - def watch_leave_group(self, group_id, callback): - raise tooz.NotImplemented - - def unwatch_leave_group(self, group_id, callback): - raise tooz.NotImplemented - def _encode_group_id(self, group_id): return _encode(self._prefix_group(group_id)) @@ -449,3 +438,11 @@ class Etcd3Driver(coordination.CoordinationDriverWithExecutor): group[1]['key'][len(self.GROUP_PREFIX):-1] for group in groups] return coordination.CoordinatorResult( self._executor.submit(_get_groups)) + + @staticmethod + def watch_elected_as_leader(group_id, callback): + raise tooz.NotImplemented + + @staticmethod + def unwatch_elected_as_leader(group_id, callback): + raise tooz.NotImplemented |