public class BinarySerializer extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
BinarySerializer
Interface used to write a group of primitives.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
batch_limit
|
protected int |
batch_size
How many primitives have been seen in this batch
|
int |
date_granularity
|
int |
granularity
|
protected List |
groups
|
protected int |
MIN_DENSE
|
protected BlockOutputStream |
output
|
protected int |
total_entities
|
| Constructor and Description |
|---|
BinarySerializer(BlockOutputStream
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
|
void |
configBatchLimit(int batch_limit)
Configure the maximum number of entities in a batch
|
void |
configGranularity(int granularity)
Set the granularity (precision of lat/lon, measured in unites of nanodegrees.
|
void |
flush()
|
StringTable |
getStringTable()
|
int |
mapDegrees(double degrees)
Convert from a degrees represented as a double into the serialized offset.
|
long |
mapRawDegrees(double degrees)
Convert from a degrees represented as a double into the serialized offset in nanodegrees..
|
void |
processBatch()
|
protected final int MIN_DENSE
protected int batch_limit
public int granularity
public int date_granularity
protected int batch_size
protected int total_entities
protected List<BinarySerializer .PrimGroupWriterInterface > groups
protected BlockOutputStreamoutput
public BinarySerializer(BlockOutputStreamoutput)
public void configGranularity(int granularity)
public void configBatchLimit(int batch_limit)
public StringTablegetStringTable()
public void flush()
throws IOException
IOException
public void close()
throws IOException
IOException
public void processBatch()
public long mapRawDegrees(double degrees)
public int mapDegrees(double degrees)