|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.proc.AbstractIndexProcedure
com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure
public abstract class AbstractKeyArrayIndexProcedure
Abstract base class supports compact serialization and compression for remote
IKeyArrayIndexProcedure execution (procedures may be executed on a
local index, but they are only (de-)serialized when executed on a remote
index).
| Nested Class Summary | |
|---|---|
static class |
AbstractKeyArrayIndexProcedure.ResultBitBuffer
A class useful for sending a logical boolean[] back from a
remote procedure call. |
static class |
AbstractKeyArrayIndexProcedure.ResultBitBufferCounter
Counts the #of true bits in the AbstractKeyArrayIndexProcedure.ResultBitBuffer(s). |
static class |
AbstractKeyArrayIndexProcedure.ResultBitBufferHandler
Knows how to aggregate AbstractKeyArrayIndexProcedure.ResultBitBuffer objects. |
static class |
AbstractKeyArrayIndexProcedure.ResultBuffer
A class useful for sending some kinds of data back from a remote procedure call (those readily expressed as a byte[][]). |
static class |
AbstractKeyArrayIndexProcedure.ResultBufferHandler
Knows how to aggregate AbstractKeyArrayIndexProcedure.ResultBuffer objects. |
| Field Summary | |
|---|---|
protected boolean |
DEBUG
True iff the log level is DEBUG or less. |
protected static org.apache.log4j.Logger |
log
|
| Constructor Summary | |
|---|---|
protected |
AbstractKeyArrayIndexProcedure()
De-serialization constructor. |
protected |
AbstractKeyArrayIndexProcedure(IRabaCoder keysCoder,
IRabaCoder valsCoder,
int fromIndex,
int toIndex,
byte[][] keys,
byte[][] vals)
|
| Method Summary | |
|---|---|
byte[] |
getKey(int i)
Return the key at the given index. |
int |
getKeyCount()
The #of keys/tuples |
IRaba |
getKeys()
The keys. |
byte[] |
getValue(int i)
Return the value at the given index. |
IRaba |
getValues()
The values. |
void |
readExternal(ObjectInput in)
|
protected void |
readMetadata(ObjectInput in)
Reads metadata written by writeMetadata(ObjectOutput). |
void |
writeExternal(ObjectOutput out)
|
protected void |
writeMetadata(ObjectOutput out)
Writes metadata (not the keys or values, but just other metadata used by the procedure). |
| Methods inherited from class com.bigdata.btree.proc.AbstractIndexProcedure |
|---|
getKeyBuilder |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.bigdata.btree.proc.IIndexProcedure |
|---|
apply, isReadOnly |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
protected final boolean DEBUG
log level is DEBUG or less.
| Constructor Detail |
|---|
protected AbstractKeyArrayIndexProcedure()
protected AbstractKeyArrayIndexProcedure(IRabaCoder keysCoder,
IRabaCoder valsCoder,
int fromIndex,
int toIndex,
byte[][] keys,
byte[][] vals)
keySer - The object used to serialize the keys.valSer - The object used to serialize the vals (optional IFF
vals is null).fromIndex - The index of the first key in keys to be processed
(inclusive).toIndex - The index of the last key in keys to be processed.keys - The keys (unsigned variable length byte[]s) MUST
be in sorted order (the logic to split procedures across
partitioned indices depends on this, plus ordered reads and
writes on indices are MUCH more efficient).vals - The values (optional, must be co-indexed with keys
when non-null).| Method Detail |
|---|
public final IRaba getKeys()
IKeyArrayIndexProcedure
getKeys in interface IKeyArrayIndexProcedurenull.public final IRaba getValues()
IKeyArrayIndexProcedure
getValues in interface IKeyArrayIndexProcedurenull if no values were associated
with the IIndexProcedure.public final int getKeyCount()
IKeyArrayIndexProcedure
getKeyCount in interface IKeyArrayIndexProcedurepublic final byte[] getKey(int i)
IKeyArrayIndexProcedure
getKey in interface IKeyArrayIndexProcedurei - The index (origin zero).
public final byte[] getValue(int i)
IKeyArrayIndexProcedure
getValue in interface IKeyArrayIndexProcedurei - The index (origin zero).
public final void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
public final void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
protected void readMetadata(ObjectInput in)
throws IOException,
ClassNotFoundException
writeMetadata(ObjectOutput).
in -
IOException
ClassNotFoundException
protected void writeMetadata(ObjectOutput out)
throws IOException
The default implementation writes out the #getKeysCoder() and the
#getValuesCoder().
out -
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||