Skip to content
Snippets Groups Projects
Commit 45c2266a authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Move more generic allocation methods to the MappingEncoding

parent a9e9a844
No related branches found
No related tags found
1 merge request!10Task mapping encoding cleanup
Showing
with 149 additions and 155 deletions
MappingEncoding.java 077e1e57aac93715a069f45cc978836b6c9cd2da YELLOW
MappingEncoding.java deb2fbce794709be30371f9e6916e7635eb8a309 RED
MappingEntryBase.java 5f825298d21edaac213c7fe7aaf632a6de5b0d1c RED
......@@ -15,15 +15,18 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding;
import static java.util.Collections.emptyList;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Random;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.partitionmapping.Partition;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.taskmapping.TaskMappingEncoding;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.taskmapping.TaskMappingEntry;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.extensions.compositegene.phenotype.PhenotypeBase;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IExecutionUnitAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IRequestAdapter;
......@@ -31,6 +34,8 @@ import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IResourceAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.ITaskAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.mapping.IMappingEncoding;
import org.fortiss.af3.exploration.alg.dse.sysmodel.mapping.IMappingEntry;
import org.fortiss.af3.exploration.alg.dse.sysmodel.random.RandomExploration;
import org.fortiss.af3.exploration.alg.exception.ExplorationRuntimeException;
import org.fortiss.af3.exploration.model.ExplorationConstraint;
import org.opt4j.core.Genotype;
......@@ -48,6 +53,9 @@ import com.google.common.collect.Multimap;
public abstract class MappingEncoding<G extends Genotype, S extends IRequestAdapter<?>, T extends IResourceAdapter<?>, M extends IMappingEntry<S, T>>
extends PhenotypeBase implements Genotype, IMappingEncoding<S, T, M> {
/** References the {@link Random} number generator singleton of the DSE. */
protected RandomExploration rand = RandomExploration.getInstance();
/**
* Allocation map
* <ul>
......@@ -97,11 +105,10 @@ public abstract class MappingEncoding<G extends Genotype, S extends IRequestAdap
}
/**
* Adds the given {@link TaskMappingEntry} to the internal allocation table and adds the
* references between {@link TaskMappingEntry}s accordingly.
* Adds the given entry to the internal allocation table.
*
* @param entry
* {@link TaskMappingEntry} to be added to the allocation table.
* {@link IMappingEntry} to be added to the table.
*/
protected void addAllocation(M entry) {
allocationMap.put(entry.getSource(), entry);
......@@ -109,24 +116,45 @@ public abstract class MappingEncoding<G extends Genotype, S extends IRequestAdap
/** {@inheritDoc} */
@Override
public synchronized Collection<T> getResources(S requester) {
Collection<T> allocatedResourcesForRequester = new HashSet<>();
for(IMappingEntry<S, T> currentMappingEntry : allocationMap.get(requester)) {
allocatedResourcesForRequester.add(currentMappingEntry.getTarget());
}
return allocatedResourcesForRequester;
public M createAndAddEntry(S requester, T resource) {
M newEntry = (resource == null) ? createEntry(requester, emptyList())
: createEntry(requester, resource);
addAllocation(newEntry);
return newEntry;
}
/** {@inheritDoc} */
@Override
public List<S> getRequesters(T resource) {
List<S> allocatedRequesters = new ArrayList<>();
for(IMappingEntry<S, T> currentMappingEntry : allocationMap.values()) {
if(currentMappingEntry.getTarget() == resource) {
allocatedRequesters.add(currentMappingEntry.getSource());
public M createEntry(S requester, List<T> deploymentTargets) {
// Select from remaining allowed deployment targets if no set of desired deployment targets
// is given
if(deploymentTargets.isEmpty()) {
deploymentTargets = new ArrayList<T>();
deploymentTargets.addAll(getResources());
}
// TODO(AD): This one has to be considered in MappingEncoding: getValidTargets.
// deploymentTargets.removeAll(getExcludedDeploymentTargets(deployableComponent));
if(deploymentTargets.isEmpty()) {
throw createNoTargetsException(requester);
}
T target = deploymentTargets.get(rand.nextInt(deploymentTargets.size()));
return createEntry(requester, target);
}
/** Removes the given {@code entry} of the given {@code task} from the mapping. */
@Override
@SuppressWarnings({"unchecked"})
public void removeEntry(M entry) {
allocationMap.remove(entry.getSource(), entry);
// TODO(AD): Add the referenced by logic again.
// referencedByMap.get(entry).forEach(e -> e.rmAssociatedElement((IMappingEntry)entry));
if(entry.getTarget() instanceof Partition) {
Partition part = (Partition)entry.getTarget();
if(getRequesters((T)part).isEmpty()) {
part.setEmpty(true);
}
}
return allocatedRequesters;
}
/** {@inheritDoc} */
......@@ -141,6 +169,28 @@ public abstract class MappingEncoding<G extends Genotype, S extends IRequestAdap
return allocationMap.values();
}
/** {@inheritDoc} */
@Override
public List<S> getRequesters(T resource) {
List<S> allocatedRequesters = new ArrayList<>();
for(IMappingEntry<S, T> currentMappingEntry : allocationMap.values()) {
if(currentMappingEntry.getTarget() == resource) {
allocatedRequesters.add(currentMappingEntry.getSource());
}
}
return allocatedRequesters;
}
/** {@inheritDoc} */
@Override
public synchronized Collection<T> getResources(S requester) {
Collection<T> allocatedResourcesForRequester = new HashSet<>();
for(IMappingEntry<S, T> currentMappingEntry : allocationMap.get(requester)) {
allocatedResourcesForRequester.add(currentMappingEntry.getTarget());
}
return allocatedResourcesForRequester;
}
/** {@inheritDoc} */
@Override
public Collection<S> getRequesters() {
......@@ -152,4 +202,11 @@ public abstract class MappingEncoding<G extends Genotype, S extends IRequestAdap
public Collection<T> getResources() {
return resources;
}
/** Creates an exception indicating an over-constrained problem. */
private ExplorationRuntimeException createNoTargetsException(S requester) {
return new ExplorationRuntimeException("Could not create an allocation entry for the" +
" requester " + requester.getName() + " due to missing resources for its" +
" allocation. This typically implies an over-constrained problem.");
}
}
Partition.java 6f18238462299f97401fad9cdbb93f75e81c6be4 RED
PartitionMappingEncoding.java 291920caf01f56484eec1416acd2ac24c20f139d RED
PartitionMappingEntry.java 3f413a060aad18e6ffb088b1a035ffb536e591cf YELLOW
Partition.java 6f18238462299f97401fad9cdbb93f75e81c6be4 RED
PartitionMappingEncoding.java a18b901cc4ecc0c4ee2c03a08f3ac1d7837dc25b RED
PartitionMappingEntry.java 3f413a060aad18e6ffb088b1a035ffb536e591cf YELLOW
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.partitionmapping;
import static org.fortiss.tooling.common.util.LambdaUtils.getFirst;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
......@@ -24,7 +26,6 @@ import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.MappingEncodin
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.operator.copy.Copyable;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IExecutionUnitAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IResourceAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.random.RandomExploration;
/**
* Encoding that maps partition, which host tasks, to execution units. Typically, these are cores.
......@@ -38,14 +39,14 @@ public class PartitionMappingEncoding extends
/** Strategy that defines how the initial mapping is constructed. */
public enum CREATE_STARTEGY {
/** One Partition per physical execution unit. */
MIN_SET,
/** Random number of partitions per physical execution unit. */
RANDOM_SET,
/**
* Same number of partitions per physical execution units as tasks exist in the system.
*/
MAX_SET
/** One Partition per physical execution unit. */
MIN_SET,
/** Random number of partitions per physical execution unit. */
RANDOM_SET,
/**
* Same number of partitions per physical execution units as tasks exist in the system.
*/
MAX_SET
}
/** Constructor. */
......@@ -62,26 +63,22 @@ public class PartitionMappingEncoding extends
// TODO: This does not consider task replicas yet.
if(strategy == CREATE_STARTEGY.MIN_SET) {
for(IExecutionUnitAdapter<?> target : targetSet) {
Partition part = new Partition();
allocationMap.put(part, new PartitionMappingEntry(part, target));
createAndAddEntry(new Partition(), target);
}
} else if(strategy == CREATE_STARTEGY.RANDOM_SET) {
for(IExecutionUnitAdapter<?> target : targetSet) {
int randMaxPartitions =
RandomExploration.getInstance().nextInt(numTasks / targetSet.size());
int randMaxPartitions = rand.nextInt(numTasks / targetSet.size());
// Ensure at least one partition per phys. execution unit.
randMaxPartitions = (randMaxPartitions < 1) ? 1 : randMaxPartitions;
for(int i = 0; i < randMaxPartitions; ++i) {
Partition part = new Partition();
allocationMap.put(part, new PartitionMappingEntry(part, target));
createAndAddEntry(new Partition(), target);
}
}
} else if(strategy == CREATE_STARTEGY.MAX_SET) {
int parititonsPerResource = numTasks / targetSet.size();
for(IExecutionUnitAdapter<?> target : targetSet) {
for(int i = 0; i < parititonsPerResource; ++i) {
Partition part = new Partition();
allocationMap.put(part, new PartitionMappingEntry(part, target));
createAndAddEntry(new Partition(), target);
}
}
}
......@@ -93,10 +90,11 @@ public class PartitionMappingEncoding extends
super(null);
}
/** Creates a {@link Partition} that is allocated to the given {@link IResourceAdapter}. */
public void createPartition(IExecutionUnitAdapter<?> resource) {
Partition newPartition = new Partition();
allocationMap.put(newPartition, new PartitionMappingEntry(newPartition, resource));
/** {@inheritDoc} */
@Override
public PartitionMappingEntry createEntry(Partition requester,
IExecutionUnitAdapter<?> resource) {
return new PartitionMappingEntry(requester, resource);
}
/** Removes a random {@link Partition} allocation to the given {@link IResourceAdapter}. */
......@@ -105,17 +103,15 @@ public class PartitionMappingEncoding extends
if(partitions.size() == 1) {
return false;
}
int randIdx = RandomExploration.getInstance().nextInt(partitions.size());
int randIdx = rand.nextInt(partitions.size());
Partition rmPartition = partitions.get(randIdx);
removePartition(resource, rmPartition);
// There exists at least one mapping entry, since we are operating on the list of partitions
// assigned to the given resource.
PartitionMappingEntry rmEntry = getFirst(getMappingEntriesOf(rmPartition)).get();
removeEntry(rmEntry);
return true;
}
/** Removes the given {@link Partition} allocation to the given {@link IResourceAdapter}. */
public void removePartition(IResourceAdapter<?> resource, Partition partition) {
allocationMap.remove(resource, partition);
}
/** {@inheritDoc} */
@Override
public int size() {
......
TaskMappingEncoding.java d0814b93d1199d75a426518222e0421d8cc71ad5 RED
TaskMappingEncoding.java a01f3e8ffca5293ce80655a4fa0832dd3e008f6d RED
TaskMappingEntry.java 407c9065007f8cd4adc8b64eea13a837bba581ae RED
......@@ -16,8 +16,6 @@
package org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.taskmapping;
import static java.util.Collections.emptyList;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
......@@ -26,21 +24,16 @@ import java.util.Map;
import java.util.Map.Entry;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.MappingEncoding;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.partitionmapping.Partition;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.taskgraph.TaskGraphEncoding;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.taskmapping.constraint.InternalReplicationConstraint;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.taskmapping.constraint.InternalSeparationConstraint;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.extensions.IConstrainedEncoding;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.operator.copy.Copyable;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IExecutionUnitAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IRequestAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IResourceAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.ITaskAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.mapping.IMappingEncoding;
import org.fortiss.af3.exploration.alg.dse.sysmodel.mapping.IMappingEntry;
import org.fortiss.af3.exploration.alg.dse.sysmodel.random.RandomExploration;
import org.fortiss.af3.exploration.alg.exception.ExplorationException;
import org.fortiss.af3.exploration.alg.exception.ExplorationRuntimeException;
import org.fortiss.af3.exploration.alg.service.module.IExplorationEncoding;
import org.fortiss.af3.exploration.model.ExplorationConstraint;
import org.fortiss.af3.exploration.moea.model.constraints.InternalConstraint;
......@@ -59,18 +52,11 @@ public abstract class TaskMappingEncoding<S extends ITaskAdapter<?>, T extends I
extends MappingEncoding<TaskMappingEncoding<S, T, M>, S, T, M>
implements IMappingEncoding<S, T, M>, Genotype, IExplorationEncoding, IConstrainedEncoding,
Copyable<TaskMappingEncoding<S, T, M>> {
/** Random generator */
private RandomExploration rand = RandomExploration.getInstance();
/** Stores the references between {@link IMappingEntry} to keep track of association updates. */
private Multimap<IMappingEntry<?, ?>, IMappingEntry<?, ?>> referencedByMap =
HashMultimap.create();
/**
* Collection of deployable {@link ITaskAdapter}s represented by {@code this} mapping.
*/
private Collection<S> tasks;
/** The input {@link TaskGraphEncoding} that contains the tasks and their signals. */
protected TaskGraphEncoding<?, S> tgEncoding;
......@@ -166,87 +152,16 @@ public abstract class TaskMappingEncoding<S extends ITaskAdapter<?>, T extends I
}
}
/**
* Creates an (encoding specific) mapping entry the describes that a given deployable component
* is mapped to a deployment target.
*/
protected abstract M createEntry(S requester, T resource);
/**
* Creates a {@link TaskMappingEntry} and adds it to {@code this} mapping. The given
* {@link IRequestAdapter} and {@link IResourceAdapter} define the source and target for the
* created {@link TaskMappingEntry}.
*
* @param requester
* Source of the {@link IMappingEntry}.
* @param resource
* {@link IRequestAdapter} of the created {@link IMappingEntry}.
* @return The created {@link TaskMappingEntry}.
*/
public M createAndAddEntry(S requester, T resource) {
M newEntry = (resource == null) ? createEntry(requester, emptyList())
: createEntry(requester, resource);
addAllocation(newEntry);
return newEntry;
}
/**
* Constructs a random {@TaskMappingEntry} for the given deployable
* component. The deployment targets can be given as a list, otherwise the deployment targets
* are taken from the platform.
*/
protected M createEntry(S requester, List<T> deploymentTargets) {
// Select from remaining allowed deployment targets if no set of desired deployment targets
// is given
if(deploymentTargets.isEmpty()) {
deploymentTargets = new ArrayList<T>();
deploymentTargets.addAll(getResources());
// TODO: Reenable when the constraints twds phys exec units are operational again.
// for(IResourceAdapter<?> physResource : allowedAllocations.get(deployableComponent)) {
// deploymentTargets.addAll(partMappingEncoding.getRequesters(physResource));
// }
}
// Remove any disallowed mapping
// TODO(AD): This one has to be considered in MappingEncoding: getValidTargets.
// deploymentTargets.removeAll(getExcludedDeploymentTargets(deployableComponent));
if(deploymentTargets.isEmpty()) {
throw createNoTargetsException(requester);
}
T target = deploymentTargets.get(rand.nextInt(deploymentTargets.size()));
return createEntry(requester, target);
}
/** Creates an exception indicating an over-constrained problem. */
private ExplorationRuntimeException createNoTargetsException(S requester) {
return new ExplorationRuntimeException("Could not create an allocation entry for the" +
" requester " + requester.getName() + " due to missing resources for its" +
" allocation. This typically implies an over-constrained problem.");
}
/** Removes the given {@code entry} of the given {@code task} from the mapping. */
@SuppressWarnings({"rawtypes", "unchecked"})
public void removeEntry(M entry) {
allocationMap.remove(entry.getSource(), entry);
referencedByMap.get(entry).forEach(e -> e.rmAssociatedElement((IMappingEntry)entry));
if(entry.getTarget() instanceof Partition) {
Partition part = (Partition)entry.getTarget();
if(getRequesters((T)part).isEmpty()) {
part.setEmpty(true);
}
}
}
/**
* Removes the given {@link ITaskAdapter} and, consequently, all associated
* entries from the mapping.
*/
@SuppressWarnings({"rawtypes", "unchecked"})
public Collection<M> removeTask(S deployableComponent) {
for(M entry : allocationMap.get(deployableComponent)) {
public Collection<M> removeTask(S task) {
for(M entry : allocationMap.get(task)) {
referencedByMap.get(entry).forEach(e -> e.rmAssociatedElement((IMappingEntry)entry));
}
return allocationMap.removeAll(deployableComponent);
return allocationMap.removeAll(task);
}
/** Assigns deployment targets to a deployable component */
......@@ -255,11 +170,7 @@ public abstract class TaskMappingEncoding<S extends ITaskAdapter<?>, T extends I
deploymentTargets.forEach(e -> addAllocation(e));
}
/**
* Creates a copy of the internal constraint map of {@code this} {@link TaskMappingEncoding}.
*/
// FIXME(AD): This copy method should not be needed anymore. Any task like this should be done
// generically in the mater
/** Creates a copy of the internal constraint map of {@code this} {@link MappingEncoding}. */
public Multimap<Class<? extends ExplorationConstraint<?>>, ExplorationConstraint<?>>
copyConstraintMap(Map<M, M> copyAssocMap) {
Multimap<Class<? extends ExplorationConstraint<?>>, ExplorationConstraint<?>> copiedMap =
......
MutatePartitionBase.java 12aecbd02c0470af59439dbba8c8d3bcaab7f1fd YELLOW
MutatePartitionDecrement.java 9ac8c26046f8486defa6e81ee587fa11632fbd86 YELLOW
MutatePartitionIncrement.java b42cb33160f13c60922e1863f79dc1ada01d2ac2 YELLOW
MutatePartitionDecrement.java 551094b653a43b5b2453d3cabe29edee1640d97d YELLOW
MutatePartitionIncrement.java aa734a343f73d4f6c305dce4e573f42f985fe385 YELLOW
PartitionMappingModule.java 6ea71af97aeda9156d3bbfc10e492cc95b4b6880 YELLOW
......@@ -47,8 +47,7 @@ public class MutatePartitionDecrement extends MutatePartitionBase {
new ArrayList<>(genotype.getMappingEntries());
for(PartitionMappingEntry partitionMappingEntry : preMutateEntries) {
if(rand.nextDouble() < p) {
genotype.removePartition(partitionMappingEntry.getTarget(),
partitionMappingEntry.getSource());
genotype.removeEntry(partitionMappingEntry);
}
}
}
......
......@@ -18,6 +18,7 @@ package org.fortiss.af3.exploration.alg.dse.backend.opt4j.operator.mutate.partit
import java.util.ArrayList;
import java.util.Collection;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.partitionmapping.Partition;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.partitionmapping.PartitionMappingEncoding;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.partitionmapping.PartitionMappingEntry;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.extensions.compositegene.constraint.ConstrainedGenotypeMap;
......@@ -46,7 +47,7 @@ public class MutatePartitionIncrement extends MutatePartitionBase {
new ArrayList<>(genotype.getMappingEntries());
for(PartitionMappingEntry partitionMappingEntry : preMutateEntries) {
if(rand.nextDouble() < p) {
genotype.createPartition(partitionMappingEntry.getTarget());
genotype.createAndAddEntry(new Partition(), partitionMappingEntry.getTarget());
}
}
}
......
IMappingEncoding.java 2317cea4121b2a975e414615797c19b7f7319556 YELLOW
IMappingEncoding.java 5213a9daf74e191f25fb24bc5d551abbeb7ec648 YELLOW
IMappingEntry.java 616cd919c2519391255f0829626833789f76193c YELLOW
......@@ -18,6 +18,7 @@ package org.fortiss.af3.exploration.alg.dse.sysmodel.mapping;
import java.util.Collection;
import java.util.List;
import org.fortiss.af3.exploration.alg.dse.backend.opt4j.encoding.taskmapping.TaskMappingEntry;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IRequestAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IResourceAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.ITaskAdapter;
......@@ -39,18 +40,47 @@ public interface IMappingEncoding<S extends IRequestAdapter<?>, T extends IResou
* {@link ITaskAdapter} to fin valid allocation targets for.
* @return Collection of valid target {@link IResourceAdapter}s.
*/
public Collection<T> getValidTargetResources(S source);
Collection<T> getValidTargetResources(S source);
/**
* Creates an (encoding specific) mapping entry the describes that a given deployable component
* is mapped to a deployment target.
*/
M createEntry(S requester, T resource);
/**
* Creates a {@link TaskMappingEntry} and adds it to {@code this} mapping. The given
* {@link IRequestAdapter} and {@link IResourceAdapter} define the source and target for the
* created {@link TaskMappingEntry}.
*
* @param requester
* Source of the {@link IMappingEntry}.
* @param resource
* {@link IRequestAdapter} of the created {@link IMappingEntry}.
* @return The created {@link TaskMappingEntry}.
*/
M createAndAddEntry(S requester, T resource);
/**
* Constructs a random {@TaskMappingEntry} for the given deployable
* component. The deployment targets can be given as a list, otherwise the deployment targets
* are taken from the platform.
*/
M createEntry(S requester, List<T> deploymentTargets);
/** Removes the given {@code entry} from the mapping. */
void removeEntry(M entry);
/**
* Returns the allocation of a specific {@link IRequestAdapter} to its {@link IMappingEntry}s.
*/
public Collection<T> getResources(S source);
Collection<T> getResources(S source);
/**
* Returns the set of {@link IResourceAdapter}s to which {@link IRequestAdapter}s can be
* allocated.
*/
public Collection<T> getResources();
Collection<T> getResources();
/**
* Returns the {@link IRequestAdapter}s allocated to the given {@link IResourceAdapter}.
......@@ -59,20 +89,20 @@ public interface IMappingEncoding<S extends IRequestAdapter<?>, T extends IResou
* Allocation target.
* @return Allocated {@link IRequestAdapter}s.
*/
public List<S> getRequesters(T resource);
List<S> getRequesters(T resource);
/**
* Returns the collection of {@link IMappingEntry}s which represent the (multi-)allocation of
* the given {@link IRequestAdapter}s to {@link IResourceAdapter}s.
*/
public Collection<M> getMappingEntriesOf(S source);
Collection<M> getMappingEntriesOf(S source);
/**
* Returns the collection of {@link IMappingEntry}s contained in {@code this}
* {@link IMappingEncoding}.
*/
public Collection<M> getMappingEntries();
Collection<M> getMappingEntries();
/** Returns the collection of resource requesters. */
public Collection<S> getRequesters();
Collection<S> getRequesters();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment