public class NewsDB
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
NewsDB.Record |
Modifier and Type | Field and Description |
---|---|
private int |
attributesMaxLength |
private static int |
categoryStringLength |
static int |
idLength |
private static GenericFormatter |
my_SHORT_SECOND_FORMATTER |
private Index |
news |
private java.io.File |
path |
private Row |
rowdef |
Constructor and Description |
---|
NewsDB(java.io.File path,
int maxNewsRecordLength,
boolean useTailCache,
boolean exceed134217727) |
Modifier and Type | Method and Description |
---|---|
private NewsDB.Record |
b2r(Row.Entry b) |
void |
close() |
protected void |
finalize() |
NewsDB.Record |
get(java.lang.String id) |
NewsDB.Record |
newRecord(Seed mySeed,
java.lang.String category,
java.util.Map<java.lang.String,java.lang.String> attributes) |
NewsDB.Record |
newRecord(Seed mySeed,
java.lang.String category,
java.util.Properties attributes) |
NewsDB.Record |
newRecord(java.lang.String external) |
NewsDB.Record |
put(NewsDB.Record record) |
private Row.Entry |
r2b(NewsDB.Record r) |
void |
remove(java.lang.String id) |
private void |
resetDB() |
int |
size() |
private final java.io.File path
private final Row rowdef
private final int attributesMaxLength
private Index news
private static final int categoryStringLength
public static final int idLength
private static final GenericFormatter my_SHORT_SECOND_FORMATTER
public NewsDB(java.io.File path, int maxNewsRecordLength, boolean useTailCache, boolean exceed134217727)
private void resetDB()
public void close()
protected void finalize()
finalize
in class java.lang.Object
public int size()
public void remove(java.lang.String id) throws java.io.IOException
java.io.IOException
public NewsDB.Record put(NewsDB.Record record) throws java.io.IOException, SpaceExceededException
java.io.IOException
SpaceExceededException
public NewsDB.Record get(java.lang.String id) throws java.io.IOException
java.io.IOException
private NewsDB.Record b2r(Row.Entry b)
private final Row.Entry r2b(NewsDB.Record r)
public NewsDB.Record newRecord(Seed mySeed, java.lang.String category, java.util.Properties attributes)
public NewsDB.Record newRecord(Seed mySeed, java.lang.String category, java.util.Map<java.lang.String,java.lang.String> attributes)
public NewsDB.Record newRecord(java.lang.String external)