Search in sources :

Example 11 with DBException

use of org.iobserve.model.persistence.DBException in project iobserve-analysis by research-iobserve.

the class WhitelistFilter method computeAvailableIps.

private Set<String> computeAvailableIps() throws DBException {
    final List<AllocationContext> allocations = this.allocationResource.collectAllObjectsByType(AllocationContext.class, AllocationPackage.Literals.ALLOCATION_CONTEXT);
    final Set<String> availableIps = new LinkedHashSet<>();
    for (final AllocationContext allocation : allocations) {
        try {
            availableIps.add(this.resourceEnvironmentResource.resolve(allocation.getResourceContainer_AllocationContext()).getEntityName());
        } catch (InvocationException | DBException e) {
            this.logger.error("Could not resolve resource container during the computation of the IP from: " + allocation, e);
        }
    }
    return availableIps;
}
Also used : AllocationContext(org.palladiosimulator.pcm.allocation.AllocationContext) LinkedHashSet(java.util.LinkedHashSet) DBException(org.iobserve.model.persistence.DBException) InvocationException(org.iobserve.model.persistence.neo4j.InvocationException)

Aggregations

DBException (org.iobserve.model.persistence.DBException)11 IOException (java.io.IOException)3 LinkedHashSet (java.util.LinkedHashSet)3 EObject (org.eclipse.emf.ecore.EObject)3 InvocationException (org.iobserve.model.persistence.neo4j.InvocationException)3 Node (org.neo4j.graphdb.Node)3 Allocation (org.palladiosimulator.pcm.allocation.Allocation)3 AllocationContext (org.palladiosimulator.pcm.allocation.AllocationContext)3 Repository (org.palladiosimulator.pcm.repository.Repository)3 ResourceEnvironment (org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment)3 System (org.palladiosimulator.pcm.system.System)3 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 ModelImporter (org.iobserve.model.ModelImporter)2 CorrespondenceModel (org.iobserve.model.correspondence.CorrespondenceModel)2 Neo4JModelResource (org.iobserve.model.persistence.neo4j.Neo4JModelResource)2 DataProtectionModel (org.iobserve.model.privacy.DataProtectionModel)2 AssemblyContext (org.palladiosimulator.pcm.core.composition.AssemblyContext)2 File (java.io.File)1 List (java.util.List)1