1 | package diskCacheV111.vehicles; |
2 | |
3 | import java.io.Serializable; |
4 | |
5 | import diskCacheV111.pools.PoolCostInfo; |
6 | |
7 | public class PoolManagerPoolInformation |
8 | implements Serializable |
9 | { |
10 | static final long serialVersionUID = -279163439475487756L; |
11 | |
12 | private final String _name; |
13 | private double _spaceCost; |
14 | private double _cpuCost; |
15 | private PoolCostInfo _poolCostInfo; |
16 | |
17 | public PoolManagerPoolInformation(String name) |
18 | { |
19 | this(name, 0.0, 0.0); |
20 | } |
21 | |
22 | public PoolManagerPoolInformation(String name, double spaceCost, double cpuCost) |
23 | { |
24 | _name = name; |
25 | _spaceCost = spaceCost; |
26 | _cpuCost = cpuCost; |
27 | } |
28 | |
29 | public String getName() |
30 | { |
31 | return _name; |
32 | } |
33 | |
34 | public void setSpaceCost(double spaceCost) |
35 | { |
36 | _spaceCost = spaceCost; |
37 | } |
38 | |
39 | public double getSpaceCost() |
40 | { |
41 | return _spaceCost; |
42 | } |
43 | |
44 | public void setCpuCost(double cpuCost) |
45 | { |
46 | _cpuCost = cpuCost; |
47 | } |
48 | |
49 | public double getCpuCost() |
50 | { |
51 | return _cpuCost; |
52 | } |
53 | |
54 | public void setPoolCostInfo(PoolCostInfo poolCostInfo) |
55 | { |
56 | _poolCostInfo = poolCostInfo; |
57 | } |
58 | |
59 | public PoolCostInfo getPoolCostInfo() |
60 | { |
61 | return _poolCostInfo; |
62 | } |
63 | |
64 | @Override |
65 | public String toString() |
66 | { |
67 | return String.format("[name=%s;space=%f;cpu=%f]", |
68 | _name, _spaceCost, _cpuCost); |
69 | } |
70 | } |