public class FastBit
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
FastBit.QueryHandle
An auxiliary class to hold handles to query objects.
|
Constructor and Description |
---|
FastBit(java.lang.String rcfile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
add_bytes(java.lang.String colname,
byte[] arr)
Add values to a values to a byte-valued column.
|
int |
add_doubles(java.lang.String colname,
double[] arr)
Add the name column containing double values.
|
int |
add_floats(java.lang.String colname,
float[] arr)
Add values to a values to a float-valued column.
|
int |
add_ints(java.lang.String colname,
int[] arr)
Add values to a values to a int-valued column.
|
int |
add_longs(java.lang.String colname,
long[] arr)
Add values to a values to a long-valued column.
|
int |
add_shorts(java.lang.String colname,
short[] arr)
Add values to a values to a short-valued column.
|
int |
build_index(java.lang.String dir,
java.lang.String col,
java.lang.String opt)
Build an index for the named column.
|
int |
build_indexes(java.lang.String dir,
java.lang.String opt)
Build indexes for all columns in the specified directory.
|
FastBit.QueryHandle |
build_query(java.lang.String select,
java.lang.String datadir,
java.lang.String where)
Build a new query object.
|
protected void |
cleanup()
Cleanup resources hold by FastBit services.
|
int |
destroy_query(FastBit.QueryHandle handle)
Destroy a query object.
|
protected void |
finalize()
Perform the final clean up job.
|
java.lang.String |
get_logfile()
Retrieve the name of the log file.
|
int |
get_message_level()
Return the current message level used by FastBit.
|
byte[] |
get_qualified_bytes(FastBit.QueryHandle handle,
java.lang.String col)
Retrieve the values of the named column from the rows satisfying
the query conditions.
|
double[] |
get_qualified_doubles(FastBit.QueryHandle handle,
java.lang.String col)
Retrieve values as doubles.
|
float[] |
get_qualified_floats(FastBit.QueryHandle handle,
java.lang.String col)
Retrieve values as floats.
|
int[] |
get_qualified_ints(FastBit.QueryHandle handle,
java.lang.String col)
Retrieve values as ints.
|
long[] |
get_qualified_longs(FastBit.QueryHandle handle,
java.lang.String col)
Retrieve values as longs.
|
short[] |
get_qualified_shorts(FastBit.QueryHandle handle,
java.lang.String col)
Retrieve values as shorts.
|
int[] |
get_result_row_ids(FastBit.QueryHandle handle)
Retrieve the ids of rows satisfying the query conditions.
|
int |
get_result_size(FastBit.QueryHandle handle)
Return the number of records/rows satisfying the query conditions.
|
protected void |
init(java.lang.String rcfile)
Function to initialize required data structure on C++ side.
|
int |
number_of_columns(java.lang.String dir)
Compute the number of columns in the specified directory.
|
int |
number_of_rows(java.lang.String dir)
Compute the number of rows in the specified directory.
|
int |
purge_index(java.lang.String dir,
java.lang.String col)
Remove the index files associated with the specified column
|
int |
purge_indexes(java.lang.String dir)
Remove all existing index files.
|
int |
set_logfile(java.lang.String filename)
Change the name of the log file.
|
int |
set_message_level(int level)
Change the message level to the specified value.
|
int |
write_buffer(java.lang.String dir)
Write the buffer to the named directory.
|
public FastBit(java.lang.String rcfile)
public int build_indexes(java.lang.String dir, java.lang.String opt)
public int purge_indexes(java.lang.String dir)
public int build_index(java.lang.String dir, java.lang.String col, java.lang.String opt)
public int purge_index(java.lang.String dir, java.lang.String col)
public FastBit.QueryHandle build_query(java.lang.String select, java.lang.String datadir, java.lang.String where)
public int destroy_query(FastBit.QueryHandle handle)
public int[] get_result_row_ids(FastBit.QueryHandle handle)
public int get_result_size(FastBit.QueryHandle handle)
public byte[] get_qualified_bytes(FastBit.QueryHandle handle, java.lang.String col)
public short[] get_qualified_shorts(FastBit.QueryHandle handle, java.lang.String col)
public int[] get_qualified_ints(FastBit.QueryHandle handle, java.lang.String col)
public long[] get_qualified_longs(FastBit.QueryHandle handle, java.lang.String col)
public float[] get_qualified_floats(FastBit.QueryHandle handle, java.lang.String col)
public double[] get_qualified_doubles(FastBit.QueryHandle handle, java.lang.String col)
public int write_buffer(java.lang.String dir)
public int add_doubles(java.lang.String colname, double[] arr)
public int add_floats(java.lang.String colname, float[] arr)
public int add_longs(java.lang.String colname, long[] arr)
public int add_ints(java.lang.String colname, int[] arr)
public int add_shorts(java.lang.String colname, short[] arr)
public int add_bytes(java.lang.String colname, byte[] arr)
public int number_of_rows(java.lang.String dir)
public int number_of_columns(java.lang.String dir)
public int get_message_level()
public int set_message_level(int level)
public int set_logfile(java.lang.String filename)
public java.lang.String get_logfile()
protected void init(java.lang.String rcfile)
protected void cleanup()
protected void finalize()
finalize
in class java.lang.Object