Interface JvmOptionBag
-
- All Superinterfaces:
ConfigBeanProxy
- All Known Subinterfaces:
JavaConfig
,Profiler
public interface JvmOptionBag extends ConfigBeanProxy
Factored out the list of jvm-options from at least two other interfaces that have them: java-config and profiler. Similar toPropertyBag
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
JvmOptionBag.Duck
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(String option)
List<String>
getJvmOptions()
List<String>
getJvmRawOptions()
String
getStartingWith(String start)
int
getXmsMegs()
see #getXmxMegsint
getXmxMegs()
It's observed that many a time we need the value of max heap size.void
setJvmOptions(List<String> options)
-
Methods inherited from interface org.jvnet.hk2.config.ConfigBeanProxy
createChild, deepCopy, getParent, getParent
-
-
-
-
Method Detail
-
getJvmOptions
@DuckTyped List<String> getJvmOptions()
-
setJvmOptions
void setJvmOptions(List<String> options) throws PropertyVetoException
- Throws:
PropertyVetoException
-
getXmxMegs
@DuckTyped int getXmxMegs()
It's observed that many a time we need the value of max heap size. This is useful when deciding if a user is misconfiguring the JVM by specifying -Xmx that is smaller than -Xms. Sun's JVM for example, bails out withIncompatible minimum and maximum heap sizes specified
when that happens. It's generally better to do some basic validations in those cases and that's when this method may be useful.- Returns:
- an integer specifying the actual max heap memory (-Xmx) configured. If it's specified as -Xmx2g, then 2*1024 i.e. 2048 is returned. Returns -1 if no -Xmx is specified.
-
getXmsMegs
@DuckTyped int getXmsMegs()
see #getXmxMegs- Returns:
- integer specifying -Xms in megabytes, or -1
-
contains
@DuckTyped boolean contains(String option)
-
getStartingWith
@DuckTyped String getStartingWith(String start)
-
-