MySQL NDB Cluster API Developer Guide

4.3.1.13 Dbug

Dbug allows clusterj applications to enable the DBUG functionality in cluster ndbapi library. The dbug state is a control string that consists of flags separated by colons. Flags are:

For example, the control string to trace calls and output debug information only for "jointx" and overwrite the contents of file "/tmp/dbug/jointx", use "t:d,jointx:o,/tmp/dbug/jointx". The above can be written as ClusterJHelper.newDbug().trace().debug("jointx").output("/tmp/dbug/jointx").set();

4.3.1.13.1 Synopsis
 public interface Dbug {
// Public Methods  public abstract Dbug append(String fileName);
  public abstract Dbug debug(String string);
  public abstract Dbug debug(String[] strings);
  public abstract Dbug flush();
  public abstract String get();
  public abstract Dbug output(String fileName);
  public abstract void pop();
  public abstract void print(String keyword,
                             String message);

  public abstract void push();
  public abstract void push(String state);
  public abstract void set();
  public abstract void set(String state);
  public abstract Dbug trace();
}
4.3.1.13.2 append(String)
public abstract Dbug append(String fileName);

Specify the file name for debug output (append).

Table 4.26 append(String)

Parameter Description
fileName the name of the file
return this

4.3.1.13.3 debug(String)
public abstract Dbug debug(String string);

Set the list of debug keywords.

Table 4.27 debug(String)

Parameter Description
string the comma separated debug keywords
return this

4.3.1.13.4 debug(String[])
public abstract Dbug debug(String[] strings);

Set the list of debug keywords.

Table 4.28 debug(String[])

Parameter Description
strings the debug keywords
return this

4.3.1.13.5 flush()
public abstract Dbug flush();

Force flush after each output operation.

Table 4.29 flush()

Parameter Description
return this

4.3.1.13.6 get()
public abstract String get();

Return the current state.

Table 4.30 get()

Parameter Description
return the current state

4.3.1.13.7 output(String)
public abstract Dbug output(String fileName);

Specify the file name for debug output (overwrite).

Table 4.31 output(String)

Parameter Description
fileName the name of the file
return this

4.3.1.13.8 pop()
public abstract void pop();

Pop the current state. The new state will be the previously pushed state.

4.3.1.13.9 print(String, String)
public abstract void print(String keyword,
                           String message);

Print debug message.

4.3.1.13.10 push()
public abstract void push();

Push the current state as defined by the methods.

4.3.1.13.11 push(String)
public abstract void push(String state);

Push the current state and set the parameter as the new state.

Table 4.32 push(String)

Parameter Description
state the new state

4.3.1.13.12 set()
public abstract void set();

Set the current state as defined by the methods.

4.3.1.13.13 set(String)
public abstract void set(String state);

Set the current state from the parameter.

Table 4.33 set(String)

Parameter Description
state the new state

4.3.1.13.14 trace()
public abstract Dbug trace();

Set the trace flag.

Table 4.34 trace()

Parameter Description
return this