Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
prisma-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Descartes Research
prisma-core
Commits
b9269054
Commit
b9269054
authored
9 years ago
by
Simon Spinner
Browse files
Options
Downloads
Patches
Plain Diff
Adapt to API changes.
parent
6ae98e4d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools.descartes.prisma.agent.mysql/src/tools/descartes/prisma/agent/mysql/Agent.java
+4
-10
4 additions, 10 deletions
...t.mysql/src/tools/descartes/prisma/agent/mysql/Agent.java
with
4 additions
and
10 deletions
tools.descartes.prisma.agent.mysql/src/tools/descartes/prisma/agent/mysql/Agent.java
+
4
−
10
View file @
b9269054
...
...
@@ -17,11 +17,9 @@ import tools.descartes.prisma.core.templates.repository.BasicComponentTemplate;
import
tools.descartes.prisma.core.templates.repository.CompositeComponentTemplate
;
import
tools.descartes.prisma.core.templates.repository.InterfaceProvidingRoleTemplate
;
import
tools.descartes.prisma.core.templates.repository.InterfaceTemplate
;
import
tools.descartes.prisma.core.templates.repository.ProvidingDelegationConnectorTemplate
;
import
tools.descartes.prisma.core.templates.repository.RepositoryTemplate
;
import
tools.descartes.prisma.core.templates.repository.SignatureTemplate
;
import
tools.descartes.prisma.core.templates.resourceconfiguration.ActiveResourceSpecificationTemplate
;
import
tools.descartes.prisma.core.templates.resourceconfiguration.ProcessingResourceSpecificationTemplate
;
import
tools.descartes.prisma.core.templates.resourcelandscape.ComputingInfrastructureTemplate
;
import
tools.descartes.prisma.core.templates.resourcelandscape.DataCenterTemplate
;
import
tools.descartes.prisma.core.templates.resourcelandscape.DistributedDataCenterTemplate
;
...
...
@@ -50,8 +48,7 @@ public class Agent implements IApplication {
private
void
initModel
(
ApplicationModel
model
)
throws
Exception
{
ResourceTypeRepositoryTemplate
resourceTypes
=
new
ResourceTypeRepositoryTemplate
();
ProcessingResourceTypeTemplate
cpuType
=
new
ProcessingResourceTypeTemplate
(
"CPU"
);
resourceTypes
.
add
(
cpuType
);
ProcessingResourceTypeTemplate
cpuType
=
resourceTypes
.
defineProcessingResource
(
"CPU"
);
RepositoryTemplate
repository
=
new
RepositoryTemplate
();
SystemTemplate
system
=
new
SystemTemplate
();
DistributedDataCenterTemplate
ddc
=
new
DistributedDataCenterTemplate
();
...
...
@@ -61,12 +58,9 @@ public class Agent implements IApplication {
// Add a computing infrastructure corresponding to the current machine
String
localIp
=
InetAddress
.
getLocalHost
().
getHostName
();
ActiveResourceSpecificationTemplate
res
=
new
ActiveResourceSpecificationTemplate
();
ProcessingResourceSpecificationTemplate
cpu
=
new
ProcessingResourceSpecificationTemplate
(
"cpu"
,
cpuType
,
SchedulingPolicy
.
PROCESSOR_SHARING
,
2
);
res
.
add
(
cpu
);
ComputingInfrastructureTemplate
localHost
=
new
ComputingInfrastructureTemplate
(
localIp
);
localHost
.
add
(
res
);
dataCenter
.
add
(
localHost
);
ComputingInfrastructureTemplate
localHost
=
dataCenter
.
defineComputingInfrastructure
(
localIp
);
ActiveResourceSpecificationTemplate
res
=
localHost
.
defineActiveResource
(
"cpu-resources"
);
res
.
defineProcessingResource
(
"cpu"
,
cpuType
,
SchedulingPolicy
.
PROCESSOR_SHARING
,
2
);
InterfaceTemplate
jdbc
=
repository
.
defineInterface
(
"java.sql.Connection"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment