com.continuent.tungsten.replicator.consistency
Class DataScanCtrl

java.lang.Object
  extended by com.continuent.tungsten.replicator.consistency.DataScanCtrl

public class DataScanCtrl
extends java.lang.Object

This class defines a DataScanCtrl that implements a utility to access DataScan methods. See the printHelp() command for a description of current commands.

Version:
1.0
Author:
Linas Virbalas

Method Summary
protected static void fail()
          Exit with a process failure code.
protected static void fatal(java.lang.String msg, java.lang.Throwable t)
          Abort following a fatal error.
protected static boolean getBoolOrFalse(java.lang.Boolean bool)
          Returns a value of a given Boolean object or false if the object is null.
 void go()
          Process commands.
static boolean isNumericCol(Column col)
          Returns if the given column is of numeric type.
static void main(java.lang.String[] argv)
          Main method to run utility.
protected static void print(java.lang.String msg)
          Print a message to stdout without trailing new line character.
protected static void printHelp()
           
protected static void println(java.lang.String msg)
          Print a message to stdout with trailing new line character.
protected static boolean readYes()
          Reads a character from stdin, blocks until it is not received.
protected static void succeed()
          Exit with a process success code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] argv)
Main method to run utility.

Parameters:
argv - optional command string

go

public void go()
Process commands.


isNumericCol

public static boolean isNumericCol(Column col)
Returns if the given column is of numeric type.


printHelp

protected static void printHelp()

println

protected static void println(java.lang.String msg)
Print a message to stdout with trailing new line character.

Parameters:
msg -

print

protected static void print(java.lang.String msg)
Print a message to stdout without trailing new line character.

Parameters:
msg -

fatal

protected static void fatal(java.lang.String msg,
                            java.lang.Throwable t)
Abort following a fatal error.

Parameters:
msg -
t -

fail

protected static void fail()
Exit with a process failure code.


succeed

protected static void succeed()
Exit with a process success code.


readYes

protected static boolean readYes()
                          throws java.io.IOException
Reads a character from stdin, blocks until it is not received.

Returns:
true if use pressed `y`, false otherwise.
Throws:
java.io.IOException

getBoolOrFalse

protected static boolean getBoolOrFalse(java.lang.Boolean bool)
Returns a value of a given Boolean object or false if the object is null.

Parameters:
bool - Boolean object to check and return.
Returns:
the value of a given Boolean object or false if the object is null.