Solution_ - the solution type, the class with the PlanningSolution annotationpublic class VariableListenerSupport<Solution_> extends Object implements SupplyManager
| Modifier and Type | Field and Description |
|---|---|
protected int |
nextGlobalOrder |
protected List<VariableListenerNotifiable> |
notifiableList |
protected boolean |
notificationQueuesAreEmpty |
protected InnerScoreDirector<Solution_> |
scoreDirector |
protected Map<EntityDescriptor<Solution_>,List<VariableListenerNotifiable>> |
sourceEntityToNotifiableMap |
protected Map<VariableDescriptor,List<VariableListenerNotifiable>> |
sourceVariableToNotifiableMap |
protected Map<Demand,Supply> |
supplyMap |
| Constructor and Description |
|---|
VariableListenerSupport(InnerScoreDirector<Solution_> scoreDirector) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterEntityAdded(EntityDescriptor<Solution_> entityDescriptor,
Object entity) |
void |
afterEntityRemoved(EntityDescriptor<Solution_> entityDescriptor,
Object entity) |
void |
afterVariableChanged(VariableDescriptor<Solution_> variableDescriptor,
Object entity) |
void |
assertNotificationQueuesAreEmpty() |
void |
beforeEntityAdded(EntityDescriptor<Solution_> entityDescriptor,
Object entity) |
void |
beforeEntityRemoved(EntityDescriptor<Solution_> entityDescriptor,
Object entity) |
void |
beforeVariableChanged(VariableDescriptor<Solution_> variableDescriptor,
Object entity) |
void |
clearWorkingSolution() |
<S extends Supply> |
demand(Demand<S> demand)
|
void |
linkVariableListeners() |
void |
resetWorkingSolution() |
void |
triggerAllVariableListeners() |
void |
triggerVariableListenersInNotificationQueues() |
protected final InnerScoreDirector<Solution_> scoreDirector
protected final List<VariableListenerNotifiable> notifiableList
protected final Map<VariableDescriptor,List<VariableListenerNotifiable>> sourceVariableToNotifiableMap
protected final Map<EntityDescriptor<Solution_>,List<VariableListenerNotifiable>> sourceEntityToNotifiableMap
protected int nextGlobalOrder
protected boolean notificationQueuesAreEmpty
public VariableListenerSupport(InnerScoreDirector<Solution_> scoreDirector)
public void linkVariableListeners()
public <S extends Supply> S demand(Demand<S> demand)
SupplyManagerSupply for a Demand, preferably an existing one.
If the Supply doesn't exist yet (as part of the domain model or externalized), it creates and attaches it.demand in interface SupplyManagerS - Subclass of Supplydemand - never nullpublic void resetWorkingSolution()
public void clearWorkingSolution()
public void beforeEntityAdded(EntityDescriptor<Solution_> entityDescriptor, Object entity)
public void afterEntityAdded(EntityDescriptor<Solution_> entityDescriptor, Object entity)
public void beforeVariableChanged(VariableDescriptor<Solution_> variableDescriptor, Object entity)
public void afterVariableChanged(VariableDescriptor<Solution_> variableDescriptor, Object entity)
public void beforeEntityRemoved(EntityDescriptor<Solution_> entityDescriptor, Object entity)
public void afterEntityRemoved(EntityDescriptor<Solution_> entityDescriptor, Object entity)
public void triggerVariableListenersInNotificationQueues()
public void triggerAllVariableListeners()
public void assertNotificationQueuesAreEmpty()
Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.