Consumption Analytics Documentation

Home > Documentation for older versions > Cloud Cruiser 3 > Batch XML Reference > Transform processors > RoundResourceValues


Table of contents
No headers

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


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


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

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">
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="processors">
          <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" />
Last modified


This page has no custom tags.


This page has no classifications.

 (c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP