Class PipelinedUtils
- java.lang.Object
-
- org.apache.jackrabbit.oak.index.indexer.document.flatfile.pipelined.PipelinedUtils
-
public class PipelinedUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description PipelinedUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
formatAsPercentage(long numerator, long denominator)
Format a percentage as a string with 2 decimal places.static String
formatAsTransferSpeedMBs(long numberOfBytes, long timeMillis)
static int
toPercentage(long numerator, long denominator)
Convert to a percentage as an integer from 0 to 100, with -1 representing an undefined value.static int
toPercentageAsInt(long numerator, long denominator)
-
-
-
Method Detail
-
formatAsPercentage
public static String formatAsPercentage(long numerator, long denominator)
Format a percentage as a string with 2 decimal places. For instance:
formatAsPercentage(52, 1000)
returns"5.20"
.
-
toPercentage
public static int toPercentage(long numerator, long denominator)
Convert to a percentage as an integer from 0 to 100, with -1 representing an undefined value.
-
formatAsTransferSpeedMBs
public static String formatAsTransferSpeedMBs(long numberOfBytes, long timeMillis)
-
toPercentageAsInt
public static int toPercentageAsInt(long numerator, long denominator)
-
-