|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.itl.recordstore.RecordStoreWriter
public class RecordStoreWriter
Used to Write Records to a Record Store
Field Summary | |
---|---|
static int |
DEFAULT_RECORDS_PER_TRANSFER
|
Method Summary | |
---|---|
void |
close()
Flushes the cache after writing operations. |
static RecordStoreWriter |
createWriter(RecordStore recordStore,
TransactionId transactionId)
|
static RecordStoreWriter |
createWriter(RecordStore recordStore,
TransactionId transactionId,
Integer recordsPerTransfer)
|
void |
deleteAll()
Attempts to delete all Records from the new Generation been written |
void |
flush()
Flushes underlying buffer, forcing all Records to be written |
void |
write(Collection<Record> records)
Attempts to write a group of records to the Record Store |
void |
write(Record record)
Attempts to write a single record to the Record Store |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_RECORDS_PER_TRANSFER
Method Detail |
---|
public static RecordStoreWriter createWriter(RecordStore recordStore, TransactionId transactionId, Integer recordsPerTransfer)
recordStore
- Record Store to read fromtransactionId
- Transaction to read onrecordsPerTransfer
- Number of records transferred at once
public static RecordStoreWriter createWriter(RecordStore recordStore, TransactionId transactionId)
recordStore
- Record Store to read fromtransactionId
- Transaction to read on
public void deleteAll() throws RecordStoreException, TransactionStateException, TransactionNotFoundException, WriteNotAllowedException, InvalidRecordException
RecordStoreException
- If there is an error in the Record Store
TransactionStateException
- If the transaction is not in a state that will allow this operation
TransactionNotFoundException
- If a valid transaction cannot be found (or the
transaction tied to this Reader doesn't exist anymore)
WriteNotAllowedException
- If the Transaction has not been set as READ_WRITE
InvalidRecordException
- If the Record is invalidpublic void write(Record record) throws RecordStoreException, TransactionStateException, TransactionNotFoundException, WriteNotAllowedException, InvalidRecordException
record
- The record to write
RecordStoreException
- If there is an error in the Record Store
TransactionStateException
- If the transaction is not in a state that will allow this operation
TransactionNotFoundException
- If a valid transaction cannot be found (or the
transaction tied to this Reader doesn't exist anymore)
WriteNotAllowedException
- If the Transaction has not been set as READ_WRITE
InvalidRecordException
- If the Record is invalidpublic void write(Collection<Record> records) throws RecordStoreException, TransactionStateException, TransactionNotFoundException, WriteNotAllowedException, InvalidRecordException
records
- The records to write
RecordStoreException
- If there is an error in the Record Store
TransactionStateException
- If the transaction is not in a state that will allow this operation
TransactionNotFoundException
- If a valid transaction cannot be found (or the
transaction tied to this Reader doesn't exist anymore)
WriteNotAllowedException
- If the Transaction has not been set as READ_WRITE
InvalidRecordException
- If one of the Records is invalidpublic void flush() throws RecordStoreException, TransactionStateException, TransactionNotFoundException, WriteNotAllowedException, InvalidRecordException
RecordStoreException
- If there is an error in the Record Store
TransactionStateException
- If the transaction is not in a state that will allow this operation
TransactionNotFoundException
- If a valid transaction cannot be found (or the
transaction tied to this Reader doesn't exist anymore)
WriteNotAllowedException
- If the Transaction has not been set as READ_WRITE
InvalidRecordException
- If one of the Records is invalidpublic void close() throws RecordStoreException, TransactionStateException, TransactionNotFoundException, WriteNotAllowedException, InvalidRecordException
RecordStoreException
- If there is an error in the Record Store
TransactionStateException
- If the transaction is not in a state that will allow this operation
TransactionNotFoundException
- If a valid transaction cannot be found (or the
transaction tied to this Reader doesn't exist anymore)
WriteNotAllowedException
- If the Transaction has not been set as READ_WRITE
InvalidRecordException
- If one of the Records is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |