TextCopyBuffer

com.netflix.atlas.postgres.TextCopyBuffer
class TextCopyBuffer(size: Int, shouldEscapeValues: Boolean) extends CopyBuffer

Copy buffer that stores the data in the text format.

Value parameters

shouldEscapeValues

True if string values should be escaped before being written to the buffer. For sources where the values are known not to include any special characters this can be disabled to improve performance.

size

Size of the underlying character buffer. Must be at least 1.

Attributes

Graph
Supertypes
trait CopyBuffer
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def clear(): Unit

Clear the contents of the buffer so it can be reused.

Clear the contents of the buffer so it can be reused.

Attributes

Definition Classes
override def copyIn(copyManager: CopyManager, table: String): Unit

Copy the data in this buffer into the specified table.

Copy the data in this buffer into the specified table.

Attributes

Definition Classes
override def hasRemaining: Boolean

Returns true if there is space remaining in the buffer.

Returns true if there is space remaining in the buffer.

Attributes

Definition Classes
override def nextRow(): Boolean

Indicate the end of the row and prepare for the next. Returns true if the row was able to fit in the buffer. Otherwise the buffer should be copied to Postgres and cleared before re-adding the row.

Indicate the end of the row and prepare for the next. Returns true if the row was able to fit in the buffer. Otherwise the buffer should be copied to Postgres and cleared before re-adding the row.

If a single row is too big to fit in the buffer, then an IllegalStateException will be thrown to avoid an endless loop.

Attributes

Definition Classes
override def putDouble(value: Double): CopyBuffer

Put an 8-byte floating point column value into the buffer.

Put an 8-byte floating point column value into the buffer.

Attributes

Definition Classes
override def putDoubleArray(values: Array[Double]): CopyBuffer

Put an array of 8-byte floating point column value into the buffer.

Put an array of 8-byte floating point column value into the buffer.

Attributes

Definition Classes
override def putId(id: ItemId): CopyBuffer

Put an id column value into the buffer.

Put an id column value into the buffer.

Attributes

Definition Classes
override def putInt(value: Int): CopyBuffer

Put a signed 4-byte integer column value into the buffer.

Put a signed 4-byte integer column value into the buffer.

Attributes

Definition Classes
override def putLong(value: Long): CopyBuffer

Put a signed 8-byte integer column value into the buffer.

Put a signed 8-byte integer column value into the buffer.

Attributes

Definition Classes
override def putShort(value: Short): CopyBuffer

Put a signed 2-byte integer column value into the buffer.

Put a signed 2-byte integer column value into the buffer.

Attributes

Definition Classes
override def putString(str: String): CopyBuffer

Put a string column value into the buffer.

Put a string column value into the buffer.

Attributes

Definition Classes
override def putTagsHstore(tags: SortedTagMap): CopyBuffer

Put an HSTORE column value into the buffer.

Put an HSTORE column value into the buffer.

Attributes

Definition Classes
override def putTagsJson(tags: SortedTagMap): CopyBuffer

Put a JSON column value into the buffer.

Put a JSON column value into the buffer.

Attributes

Definition Classes
override def putTagsJsonb(tags: SortedTagMap): CopyBuffer

Put a JSONB column value into the buffer.

Put a JSONB column value into the buffer.

Attributes

Definition Classes
override def putTagsText(tags: SortedTagMap): CopyBuffer

Put a JSON string column value as text into the buffer.

Put a JSON string column value as text into the buffer.

Attributes

Definition Classes
def reader(): Reader
override def remaining: Int

Returns the number of bytes remaining in the buffer.

Returns the number of bytes remaining in the buffer.

Attributes

Definition Classes
override def rows: Int

Returns the number of completed rows that are in the buffer.

Returns the number of completed rows that are in the buffer.

Attributes

Definition Classes
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any