public class SchedulingConstraints
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.HashMap<java.lang.String,Cluster> |
actorsRestrictedToCluster
Actor name as key with cluster as value where it should be allocated.
|
private java.util.HashMap<java.lang.String,Cluster> |
actorsRestrictedToDmaOfCluster
Actor name as key with DMA of a cluster as value where it should be allocated.
|
Constructor and Description |
---|
SchedulingConstraints()
Initialize the constraints lists.
|
Modifier and Type | Method and Description |
---|---|
void |
addActorClusterConstraint(java.lang.String actr,
Cluster cluster)
Add a constraint of actor mapped to a specific cluster.
|
void |
addActorDmaEngineConstraint(java.lang.String actr,
Cluster cluster)
Add a constraint of actor mapped to a DMA of specific cluster.
|
Cluster |
getActorAllocatedCluster(java.lang.String actr)
Get a cluster to which an actor is allocated.
|
java.util.HashSet<java.lang.String> |
getActorsAllocatedToCluster(Cluster cluster)
Get all the actors which are allocated to the cluster.
|
java.util.List<java.lang.String> |
getActorsAllocatedToDmaOfCluster(Cluster cluster)
Get all the actors allocated to the DMA of a cluster.
|
java.util.HashMap<Cluster,java.util.HashSet<java.lang.String>> |
getActorsMappedToCluster()
Get a map of actors mapped to all the cluster.
|
java.util.HashMap<Cluster,java.util.HashSet<java.lang.String>> |
getActorsMappedToDmaOfCluster()
Get a map of actors mapped to DMA of the cluster.
|
java.util.HashSet<java.lang.String> |
getActorsMappedToDmaOfCluster(Cluster cluster)
Get all the actors which are allocated to the DMAs of the cluster.
|
private java.util.HashMap<java.lang.String,Cluster> actorsRestrictedToCluster
private java.util.HashMap<java.lang.String,Cluster> actorsRestrictedToDmaOfCluster
public SchedulingConstraints()
public java.util.HashSet<java.lang.String> getActorsAllocatedToCluster(Cluster cluster)
cluster
- cluster instancepublic java.util.HashSet<java.lang.String> getActorsMappedToDmaOfCluster(Cluster cluster)
cluster
- cluster instancepublic java.util.HashMap<Cluster,java.util.HashSet<java.lang.String>> getActorsMappedToDmaOfCluster()
public java.util.HashMap<Cluster,java.util.HashSet<java.lang.String>> getActorsMappedToCluster()
public Cluster getActorAllocatedCluster(java.lang.String actr)
actr
- name of the actorpublic void addActorClusterConstraint(java.lang.String actr, Cluster cluster)
actr
- name of the actorcluster
- cluster to which it is allocatedpublic void addActorDmaEngineConstraint(java.lang.String actr, Cluster cluster)
actr
- name of the actorcluster
- cluster to which it is allocatedpublic java.util.List<java.lang.String> getActorsAllocatedToDmaOfCluster(Cluster cluster)
cluster
- cluster instance