public class TupleWriterImpl extends Object implements TupleWriter
| Constructor and Description |
|---|
TupleWriterImpl()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortTA(Long TAId)
Aborts the transaction with the given id.
|
void |
addTuple(Collection<String> tuple)
Adds a tuple to the stream without TA-Control.
|
void |
addTuple(Long TAId,
Collection<String> tuple)
Adds a tuple to the stream without TA-Control.
|
long |
beginTA()
Starts a transaction and returns a unique id for it.
|
void |
commitTA(Long TAId)
Commits the transaction with the given id.
|
void |
finalize() |
Collection<String> |
getAttNames()
Returns the names of attributes to which data belong.
|
String |
getEncoding()
Returns the encoding in which data shall be stored.
|
Hashtable<Character,String> |
getEscapeTable()
This method returns the current escape table for this TupleWriter
|
File |
getFile()
Returns the output file.
|
String |
getSeperator()
Returns the seperator with which the data will be departed on stream.
|
Boolean |
isDistinct()
Returns true if this tuple writer stores values more than one times, if
they are equal
|
void |
setAttNames(Collection<String> attNames)
Sets the names of attributes to which data belong.
|
void |
setDistinct(Boolean distinct)
Set the distinct value for this tuple writer.
|
void |
setEncoding(String encoding)
Sets the encoding in which data shall be stored.
|
void |
setEscapeTable(Hashtable<Character,String> escapeTable)
This method sets the table of escape sequences
|
void |
setEscaping(boolean escape)
Sets an internal flag which specifies whether special chars should be
escaped
|
void |
setFile(File out)
Sets the output file to the given.
|
void |
setSeperator(String seperator)
Sets the seperator with which the data will be departed on stream.
|
public void addTuple(Collection<String> tuple) throws FileNotFoundException
TupleWriteraddTuple in interface TupleWritertuple - - the tuple which shall be storedFileNotFoundExceptionpublic long beginTA()
TupleWriterbeginTA in interface TupleWriterpublic void addTuple(Long TAId, Collection<String> tuple) throws FileNotFoundException
TupleWriteraddTuple in interface TupleWriterTAId - - transactional id to which this adding belongs (returned by
beginTA())tuple - - the tuple which shall be storedFileNotFoundExceptionpublic void commitTA(Long TAId) throws FileNotFoundException
TupleWritercommitTA in interface TupleWriterTAId - - transactional id which is returned by beginTA()FileNotFoundExceptionpublic void abortTA(Long TAId)
TupleWriterabortTA in interface TupleWriterTAId - - transactional id which is returned by beginTA()public void setEncoding(String encoding)
TupleWritersetEncoding in interface TupleWriterencoding - in which data shall be storedpublic void setEscaping(boolean escape)
TupleWritersetEscaping in interface TupleWriterescape - true, if special chars should be escaped and false, if not.public void setEscapeTable(Hashtable<Character,String> escapeTable)
TupleWritersetEscapeTable in interface TupleWriterescapeTable - the tablepublic Hashtable<Character,String> getEscapeTable()
TupleWritergetEscapeTable in interface TupleWriterpublic String getEncoding()
TupleWritergetEncoding in interface TupleWriterpublic void setFile(File out)
TupleWritersetFile in interface TupleWriterpublic File getFile()
TupleWritergetFile in interface TupleWriterpublic void setAttNames(Collection<String> attNames)
TupleWritersetAttNames in interface TupleWriterattNames - - names of attributes to which data belongpublic Collection<String> getAttNames()
TupleWritergetAttNames in interface TupleWriterpublic void setSeperator(String seperator)
TupleWritersetSeperator in interface TupleWriterseperator - with which the data will be departed on streampublic String getSeperator()
TupleWritergetSeperator in interface TupleWriterpublic Boolean isDistinct()
TupleWriterisDistinct in interface TupleWriterpublic void setDistinct(Boolean distinct)
TupleWritersetDistinct in interface TupleWriterdistinct - true if values shall be stored distinct.Copyright © 2010–2019 Humboldt-Universität zu Berlin, INRIA. All rights reserved.