<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self):
 """ Update this provider. Should be invoked when the server gets updated. This method will notify all clients that wait for `self.next_revision_available`. """


        with self.lock:
            # Increment revision and commit it.
            self.revision += 1
            self.server.commit(self.revision + 1)

            # Unblock all waiting clients.
            self.next_revision_available.set()
            self.next_revision_available.clear()

            # Check sessions to see which revision can be removed.
            if self.sessions:
                lowest_revision = min(
                    session.revision for session in self.sessions.itervalues())

                # Remove all old revision history
                if lowest_revision == self.revision:
                    self.server.clean(lowest_revision)

        # Invoke hooks
        invoke_hooks(self.hooks, "updated", self.revision)