public class HistoryWriterImpl extends java.lang.Object implements HistoryWriter
HistoryWriter.HistoryRecordUpdater
Modifier and Type | Field and Description |
---|---|
static int |
MAX_RECORDS_PER_FILE
Maximum records per file.
|
Modifier | Constructor and Description |
---|---|
protected |
HistoryWriterImpl(HistoryImpl historyImpl) |
Modifier and Type | Method and Description |
---|---|
void |
addRecord(HistoryRecord record)
Stores the passed record complying with the historyRecordStructure.
|
void |
addRecord(java.lang.String[] propertyValues)
Stores the passed propertyValues complying with the
historyRecordStructure.
|
void |
addRecord(java.lang.String[] propertyValues,
java.util.Date timestamp)
Stores the passed propertyValues complying with the
historyRecordStructure.
|
void |
addRecord(java.lang.String[] propertyValues,
int maxNumberOfRecords)
Stores the passed propertyValues complying with the
historyRecordStructure.
|
void |
insertRecord(java.lang.String[] propertyValues,
java.util.Date timestamp,
java.lang.String timestampProperty)
Inserts a record from the passed propertyValues complying with
the current historyRecordStructure.
|
void |
updateRecord(HistoryWriter.HistoryRecordUpdater updater)
Updates history record using given HistoryRecordUpdater instance
to find which is the record to be updated and to get the new values for
the fields
|
void |
updateRecord(java.lang.String idProperty,
java.lang.String idValue,
java.lang.String property,
java.lang.String newValue)
Updates a record by searching for record with idProperty which have
idValue and updating/creating the property with newValue.
|
public static final int MAX_RECORDS_PER_FILE
protected HistoryWriterImpl(HistoryImpl historyImpl)
public void addRecord(HistoryRecord record) throws java.io.IOException
HistoryWriter
addRecord
in interface HistoryWriter
record
- The record to be added.java.io.IOException
public void addRecord(java.lang.String[] propertyValues) throws java.io.IOException
HistoryWriter
addRecord
in interface HistoryWriter
propertyValues
- The values of the record.java.io.IOException
public void addRecord(java.lang.String[] propertyValues, java.util.Date timestamp) throws java.io.IOException
HistoryWriter
addRecord
in interface HistoryWriter
propertyValues
- The values of the record.timestamp
- The timestamp of the record.java.io.IOException
public void addRecord(java.lang.String[] propertyValues, int maxNumberOfRecords) throws java.io.IOException
addRecord
in interface HistoryWriter
propertyValues
- The values of the record.maxNumberOfRecords
- the maximum number of records to keep or
value of -1 to ignore this param.java.io.IOException
public void insertRecord(java.lang.String[] propertyValues, java.util.Date timestamp, java.lang.String timestampProperty) throws java.io.IOException
insertRecord
in interface HistoryWriter
propertyValues
- The values of the record.timestamp
- The timestamp of the record.timestampProperty
- the property name for the timestamp of the
recordjava.io.IOException
public void updateRecord(java.lang.String idProperty, java.lang.String idValue, java.lang.String property, java.lang.String newValue) throws java.io.IOException
updateRecord
in interface HistoryWriter
idProperty
- name of the id propertyidValue
- value of the id propertyproperty
- the property to changenewValue
- the value of the changed property.java.io.IOException
public void updateRecord(HistoryWriter.HistoryRecordUpdater updater) throws java.io.IOException
updateRecord
in interface HistoryWriter
updater
- the HistoryRecordUpdater instance.java.io.IOException
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.