Home > Cloud Cruiser 3 > Batch XML Reference > Transform processors > RoundResourceValues

RoundResourceValues

Table of contents
No headers

Rounds the values of the resources based on the specified scale and rounding mode.

Class

<bean class="com.cloudcruiser.batch.transform.RoundResourceValues">

Properties

<property name="resources" value="resourceID1
,resourceID2
" />

Sets one or more resources whose values need to be rounded during records processing.

<property name="resourcePattern" value="resourcePattern
" />

Sets a regular expression for the matching resources whose values need the rounding processing.

<property name="roundingMode" value="HALF_EVEN" />

Sets the rounding mode. Valid values are UP , DOWN , CEILING , FLOOR , HALF_UP , HALF_DOWN , and HALF_EVEN . The default is HALF_EVEN .

<property name="scale" value="0" />

Sets the scale for the rounded resource value. The default is 0 .

Spring Batch XML Example

<batch:step id="transform" next="charge">
  <batch:tasklet>
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="processors">
        <list>
          <bean class="com.cloudcruiser.batch.transform.RoundResourceValues">
            <property name="active" value="true" />
            <property name="roundingMode" value="HALF_EVEN" />
            <property name="scale" value="2" />
            <property name="resourcePattern" value="temp.*" />
            <property name="resources" value="IPSpaceCidrMask,AnotherResource" />
          </bean>
        </list>
      </property>
    </bean>
  </batch:tasklet>
</batch:step>
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP