class
   Ktistec::Topic
 
  - Ktistec::Topic
 - Reference
 - Object
 
Overview
A pub/sub topic.
Defined in:
framework/topic.crConstant Summary
- 
        Log = 
::Log.for(self) 
Constructors
Class Method Summary
- 
        .rename_subject(before, after)
        
          
Renames a subject across all topics.
 - 
        .reset!
        
          
Resets the topic class state.
 
Instance Method Summary
- 
        #<<(subject : String)
        
          
Adds a subject.
 - 
        #finalize
        
          
Removes subjects that no longer belong to any topic.
 - 
        #notify_subscribers(value : String = "")
        
          
Notifies subscribers about updates.
 - 
        #subjects
        
          
Returns the subjects.
 - 
        #subscribe(timeout : Time::Span | Nil = nil, &)
        
          
Subscribes to updates about the topic.
 - 
        #subscriptions
        
          
Returns the subscriptions to this topic.
 
Constructor Detail
Class Method Detail
        
        def self.reset!
        #
      
      
        Resets the topic class state.
Clears all subscriptions. Clears all subjects.
This is useful when testing. It should not be used in any other context!
Instance Method Detail
        
        def finalize
        #
      
      
        Removes subjects that no longer belong to any topic.
Note: this method should only be called during garbage collection.
        
        def notify_subscribers(value : String = "")
        #
      
      
        Notifies subscribers about updates.
Passes an optional value to each subscriber.
Does not block.