Skip to content
Snippets Groups Projects
Commit 0e476592 authored by Sören Henning's avatar Sören Henning
Browse files

added models for system entities: Component, Container, Operation

parent 6cf68486
No related branches found
No related tags found
1 merge request!17Get impletemented stages and Java 8
Pipeline #
package kieker.analysis.domain.systemdependency;
import java.util.ArrayList;
import java.util.Collection;
public class Component extends SystemEntity {
private final Container container;
private final Collection<Operation> operations = new ArrayList<>();
public Component(final String name, final Container container) {
super(name, container.getIdentifier() + ',' + name);
this.container = container;
container.addComponent(this);
}
public Container getContainer() {
return container;
}
public Collection<Operation> getOperations() {
return operations;
}
protected void addOperation(final Operation operation) {
this.operations.add(operation);
}
}
package kieker.analysis.domain.systemdependency;
import java.util.ArrayList;
import java.util.Collection;
public class Container extends SystemEntity {
private final Collection<Component> components = new ArrayList<>();
public Container(final String name) {
super(name, name);
}
public Collection<Component> getComponents() {
return components;
}
protected void addComponent(final Component component) {
this.components.add(component);
}
}
package kieker.analysis.domain.systemdependency;
public class Operation extends SystemEntity {
private final Component component;
public Operation(final String name, final Component component) {
super(name, component.getIdentifier() + ',' + name);
this.component = component;
component.addOperation(this);
}
public Component getComponent() {
return component;
}
}
package kieker.analysis.domain.systemdependency;
public abstract class SystemEntity {
private final String name;
private final String identifier;
private long totalDuration;
private long medianDuration;
private long minDuration;
private long maxDuration;
private long meanDuration;
public SystemEntity(final String name, final String identifier) {
this.name = name;
this.identifier = identifier;
}
public String getName() {
return name;
}
public String getIdentifier() {
return identifier;
}
public long getTotalDuration() {
return totalDuration;
}
public void setTotalDuration(final long totalDuration) {
this.totalDuration = totalDuration;
}
public long getMedianDuration() {
return medianDuration;
}
public void setMedianDuration(final long medianDuration) {
this.medianDuration = medianDuration;
}
public long getMinDuration() {
return minDuration;
}
public void setMinDuration(final long minDuration) {
this.minDuration = minDuration;
}
public long getMaxDuration() {
return maxDuration;
}
public void setMaxDuration(final long maxDuration) {
this.maxDuration = maxDuration;
}
public long getMeanDuration() {
return meanDuration;
}
public void setMeanDuration(final long meanDuration) {
this.meanDuration = meanDuration;
}
}
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