A configurable PubSub Topic.
interface TopicThe name of the channel.
Checkpoint Topic state.
Default / Host path (unique: false, including __pregel_tasks): flat
values list, matching Python Topic. Previously this always returned
[seen, values], so empty TASKS became [[], []] and Host's Python
checkpointer rejected it.
When unique: true, keep [seen, values] so dedupe history that outlives
the current buffer still survives resume.
Mark the current value of the channel as consumed. By default, no-op. A channel can use this method to modify its state, preventing the value from being consumed again.
Returns True if the channel was updated, False otherwise.
Compare this channel with another channel for equality. Used to determine if two channels with the same key are semantically equivalent. Subclasses should override this method to provide a meaningful comparison.
Notify the channel that the Pregel run is finishing. By default, no-op. A channel can use this method to modify its state, preventing finish.
Returns True if the channel was updated, False otherwise.
Return a new identical channel, optionally initialized from a checkpoint. Can be thought of as a "restoration" from a checkpoint which is a "snapshot" of the channel's state.
Return the current value of the channel.
Return True if the channel is available (not empty), False otherwise. Subclasses should override this method to provide a more efficient implementation than calling get() and catching EmptyChannelError.
Update the channel's value with the given sequence of updates. The order of the updates in the sequence is arbitrary. This method is called by Pregel for all channels at the end of each step. If there are no updates, it is called with an empty sequence.
Raises InvalidUpdateError if the sequence of updates is invalid. Returns True if the channel was updated, False otherwise.