AbstractModel { protected void jvmPerformanceOptions(List<EnvVar> envVars) { StringBuilder jvmPerformanceOpts = new StringBuilder(); Boolean isServer = jvmOptions != null ? jvmOptions.isServer() : null; if (isServer != null && isServer) { jvmPerformanceOpts.append("-server"); } Map<String, String> xx = jvmOptions != null ? jvmOptions.getXx() : null; if (xx != null) { xx.forEach((k, v) -> { jvmPerformanceOpts.append(' ').append("-XX:"); if ("true".equalsIgnoreCase(v)) { jvmPerformanceOpts.append("+").append(k); } else if ("false".equalsIgnoreCase(v)) { jvmPerformanceOpts.append("-").append(k); } else { jvmPerformanceOpts.append(k).append("=").append(v); } }); } String jvmPerformanceOptsString = jvmPerformanceOpts.toString().trim(); if (!jvmPerformanceOptsString.isEmpty()) { envVars.add(buildEnvVar(ENV_VAR_KAFKA_JVM_PERFORMANCE_OPTS, jvmPerformanceOptsString)); } } protected  AbstractModel(HasMetadata resource, String applicationName); int getReplicas(); void setReplicas(int replicas); String getName(); String getServiceName(); String getHeadlessServiceName(); Labels getSelectorLabels(); boolean isMetricsEnabled(); OrderedProperties getDefaultLogConfig(); static OrderedProperties getOrderedProperties(String configFileName); String createLog4jProperties(OrderedProperties properties); Logging getLogging(); String parseLogging(Logging logging, ConfigMap externalCm); ConfigMap generateMetricsAndLogConfigMap(ConfigMap externalConfigMap); String getAncillaryConfigMapName(); Storage getStorage(); AbstractConfiguration getConfiguration(); String getImage(); String getCluster(); String getPodName(int podId); List<Toleration> getTolerations(); void setTolerations(List<Toleration> tolerations); static Map<String, String> containerEnvVars(Container container); Labels getLabels(); void setLabels(Labels labels); void setResources(ResourceRequirements resources); ResourceRequirements getResources(); void setJvmOptions(JvmOptions jvmOptions); JvmOptions getJvmOptions(); String getAncillaryConfigMapKeyLogConfig(); static String clusterCaCertSecretName(String cluster); static String clusterCaKeySecretName(String cluster); ServiceAccount generateServiceAccount(); static String initContainerClusterRoleBindingName(String namespace, String cluster); void addWarningCondition(Condition warning); List<Condition> getWarningConditions(); static final String STRIMZI_CLUSTER_OPERATOR_NAME; static final String ANCILLARY_CM_KEY_METRICS; static final String ANCILLARY_CM_KEY_LOG_CONFIG; static final String NETWORK_POLICY_KEY_SUFFIX; static final String ENV_VAR_DYNAMIC_HEAP_FRACTION; static final String ENV_VAR_KAFKA_HEAP_OPTS; static final String ENV_VAR_KAFKA_JVM_PERFORMANCE_OPTS; static final String ENV_VAR_DYNAMIC_HEAP_MAX; static final String ENV_VAR_STRIMZI_KAFKA_GC_LOG_ENABLED; static final String ENV_VAR_STRIMZI_JAVA_SYSTEM_PROPERTIES; static final String ENV_VAR_STRIMZI_JAVA_OPTS; static final String ENV_VAR_STRIMZI_GC_LOG_ENABLED; static final String ANNO_STRIMZI_IO_STORAGE; static final String ANNO_STRIMZI_IO_DELETE_CLAIM; @Deprecated
    static final String ANNO_CO_STRIMZI_IO_DELETE_CLAIM; static final String VOLUME_NAME; }
@Test public void testJvmPerformanceOptions() { JvmOptions opts = TestUtils.fromJson("{}", JvmOptions.class); assertThat(getPerformanceOptions(opts), is(nullValue())); opts = TestUtils.fromJson("{" + " \"-server\": \"true\"" + "}", JvmOptions.class); assertThat(getPerformanceOptions(opts), is("-server")); opts = TestUtils.fromJson("{" + " \"-XX\":" + " {\"key1\": \"value1\"," + " \"key2\": \"true\"," + " \"key3\": false," + " \"key4\": 10}" + "}", JvmOptions.class); assertThat(getPerformanceOptions(opts), is("-XX:key1=value1 -XX:+key2 -XX:-key3 -XX:key4=10")); }