Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/share/gc/GCParams.java
41161 views
1
/*
2
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*/
23
24
package nsk.share.gc;
25
26
import java.io.PrintStream;
27
28
public class GCParams {
29
private String garbageProducerId;
30
private String garbageProducer1Id;
31
private String memoryStrategyId;
32
private String lockersId;
33
34
public final String getGarbageProducerId() {
35
return garbageProducerId;
36
}
37
38
public final void setGarbageProducerId(String garbageProducerId) {
39
this.garbageProducerId = garbageProducerId;
40
}
41
42
public final String getGarbageProducer1Id() {
43
return garbageProducer1Id;
44
}
45
46
public final void setGarbageProducer1Id(String garbageProducer1Id) {
47
this.garbageProducer1Id = garbageProducer1Id;
48
}
49
50
public final String getMemoryStrategyId() {
51
return memoryStrategyId;
52
}
53
54
public final void setMemoryStrategyId(String memoryStrategyId) {
55
this.memoryStrategyId = memoryStrategyId;
56
}
57
58
public final String getLockersId() {
59
return lockersId;
60
}
61
62
public final void setLockersId(String lockersId) {
63
this.lockersId = lockersId;
64
}
65
66
public void parseCommandLine(String[] args) {
67
if (args == null)
68
return;
69
for (int i = 0; i < args.length; ++i) {
70
if (args[i].equals("-gp"))
71
garbageProducerId = args[++i];
72
else if (args[i].equals("-gp1"))
73
garbageProducer1Id = args[++i];
74
else if (args[i].equals("-ms"))
75
memoryStrategyId = args[++i];
76
else if (args[i].equals("-lockers"))
77
lockersId = args[++i];
78
}
79
printConfig(System.out);
80
}
81
82
public void prinUsage() {
83
}
84
85
public void printConfig(PrintStream out) {
86
}
87
88
private static GCParams instance;
89
90
public static GCParams getInstance() {
91
synchronized (GCParams.class) {
92
if (instance == null)
93
instance = new GCParams();
94
return instance;
95
}
96
}
97
98
public static void setInstance(GCParams gcParams) {
99
synchronized (GCParams.class) {
100
instance = gcParams;
101
}
102
}
103
}
104
105