Defined Type: cassandra::java::advancedruntimeoption

Defined in:
manifests/java/advancedruntimeoption.pp

Summary

Add an advanced runtime option to the JVM running Cassandra.

Overview

Each instance of this type adds a advanced runtime option to the JVM running Cassandra.

The config class contains a factory for this type which will create instances for each key of cassandra::java::runtime_options.

Examples:

directly created

cassandra::java::advancedruntimeoption { 'LargePageSizeInBytes':
  value => '2m',
}

factory generated

cassandra::java:
  adv_runtime_options:
    LargePageSizeInBytes: 2m
    UseLargePages: true
    AlwaysPreTouch: true

Parameters:

  • value (Scalar)

    a string value to be added to the runtime option or a boolean which will prefix the option with + or -



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'manifests/java/advancedruntimeoption.pp', line 25

define cassandra::java::advancedruntimeoption (
  Scalar $value,
) {
  $_opt = $value ? {
    Boolean => inline_epp('XX:<% if $value { -%>+<% } else { -%>-<% } -%><%= $name %>',
      {
        'name'  => $name,
        'value' => $value,
      }),
    default  => inline_epp('XX:<%= $name -%>=<%= $value %>',
      {
        'name'  => $name,
        'value' => $value,
      }),
  }
  cassandra::environment::jvm_option { $_opt: }
}