Class Blackboard<T>

java.lang.Object
de.uka.ipd.sdq.workflow.blackboard.Blackboard<T>
Type Parameters:
T - The type of the partitions of the blackboard
All Implemented Interfaces:
IBlackboard<T>
Direct Known Subclasses:
MDSDBlackboard

public class Blackboard<T> extends Object implements IBlackboard<T>
A blackboard is a storage space where workflow jobs can retrieve and store data from respectively to. It implements the well known architecture pattern "Blackboard" of POSA I The blackboard contains information pieces called partitions. Each partition contains data needed for a specific type of job. For example, in a compiler, there would be a partition called symbol table to store the detected variable declarations.
  • Constructor Details

    • Blackboard

      public Blackboard()
  • Method Details

    • addPartition

      public void addPartition(String id, T partition)
      Add a specific partition to the blackboard.
      Specified by:
      addPartition in interface IBlackboard<T>
      Parameters:
      id - The identifier for the partition to add.
      partition - The partition itself.
      See Also:
    • getPartition

      public T getPartition(String id)
      Get a specific partition from the blackboard identified by the id it was registered with.
      Specified by:
      getPartition in interface IBlackboard<T>
      Parameters:
      id - The id to get the partition for.
      Returns:
      The requested partition or null if none matching found.
      See Also:
    • hasPartition

      public boolean hasPartition(String id)
      Description copied from interface: IBlackboard
      Query the blackboard for a named partition.
      Specified by:
      hasPartition in interface IBlackboard<T>
      Parameters:
      id - The ID of the named partition
      Returns:
      true if the partition exists on the blackboard
    • removePartition

      public void removePartition(String id)
      Description copied from interface: IBlackboard
      Remove a named partition from the blackboard.
      Specified by:
      removePartition in interface IBlackboard<T>
      Parameters:
      id - ID of the partition to removeS
    • getPartitionIds

      public Set<String> getPartitionIds()
      Description copied from interface: IBlackboard
      Get the set of partitions currently present on this blackboard.
      Specified by:
      getPartitionIds in interface IBlackboard<T>
      Returns:
      the set of partition ids.