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
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPartition
(String id, T partition) Add a specific partition to the blackboard.getPartition
(String id) Get a specific partition from the blackboard identified by the id it was registered with.Get the set of partitions currently present on this blackboard.boolean
hasPartition
(String id) Query the blackboard for a named partition.void
Remove a named partition from the blackboard.
-
Constructor Details
-
Blackboard
public Blackboard()
-
-
Method Details
-
addPartition
Add a specific partition to the blackboard.- Specified by:
addPartition
in interfaceIBlackboard<T>
- Parameters:
id
- The identifier for the partition to add.partition
- The partition itself.- See Also:
-
getPartition
Get a specific partition from the blackboard identified by the id it was registered with.- Specified by:
getPartition
in interfaceIBlackboard<T>
- Parameters:
id
- The id to get the partition for.- Returns:
- The requested partition or null if none matching found.
- See Also:
-
hasPartition
Description copied from interface:IBlackboard
Query the blackboard for a named partition.- Specified by:
hasPartition
in interfaceIBlackboard<T>
- Parameters:
id
- The ID of the named partition- Returns:
- true if the partition exists on the blackboard
-
removePartition
Description copied from interface:IBlackboard
Remove a named partition from the blackboard.- Specified by:
removePartition
in interfaceIBlackboard<T>
- Parameters:
id
- ID of the partition to removeS
-
getPartitionIds
Description copied from interface:IBlackboard
Get the set of partitions currently present on this blackboard.- Specified by:
getPartitionIds
in interfaceIBlackboard<T>
- Returns:
- the set of partition ids.
-