| Modifier and Type | Field and Description |
|---|---|
| private final Queue |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public void | flushCopy()
Implements org. Force any buffered output to be sent over the network to the backend. |
| public void | |
| protected void | handleCopydata(byte[]
data that was receive by copy protocol data)Implements abstract org. Consume received copy data. |
| public @Nullable byte[] | readFromCopy()
Implements org. Blocks wait for a row of data to be received from server on an active copy operation. |
| public @Nullable byte[] | readFromCopy(boolean
true if need wait data from server otherwise false and will read
pending message from serverImplements org. Wait for a row of data to be received from server on an active copy operation. |
| public void | writeToCopy(byte[]
array of bytes to write data, int offset of first byte to write (normally zero) off, int number of bytes to write (normally buf.length) siz)Implements org. Writes specified part of given byte array to an open and writable copy operation. |
| public void | writeToCopy(ByteStreamWriter
the source of bytes, e.g. a ByteBufferByteStreamWriter from)Implements org. Writes a ByteStreamWriter to an open and writable copy operation. |
| received | back to summary |
|---|---|
| private final Queue<byte[]> received | |
| CopyDualImpl | back to summary |
|---|---|
| public CopyDualImpl() | |
| endCopy | back to summary |
|---|---|
| public long endCopy() throws SQLException Implements org. Doc from org. Finishes copy operation successfully.
| |
| flushCopy | back to summary |
|---|---|
| public void flushCopy() throws SQLException Implements org. Doc from org. Force any buffered output to be sent over the network to the backend. In general this is a useless operation as it will get pushed over in due time or when endCopy is called. Some specific modified server versions (Truviso) want this data sooner. If you are unsure if you need to use this method, don't.
| |
| handleCommandStatus | back to summary |
|---|---|
| public void handleCommandStatus(String status) throws PSQLException Overrides org.
| |
| handleCopydata | back to summary |
|---|---|
| protected void handleCopydata(byte[] data) Implements abstract org. Doc from org. Consume received copy data.
| |
| readFromCopy | back to summary |
|---|---|
| public @Nullable byte[] readFromCopy() throws SQLException Implements org. Doc from org. Blocks wait for a row of data to be received from server on an active copy operation.
| |
| readFromCopy | back to summary |
|---|---|
| public @Nullable byte[] readFromCopy(boolean block) throws SQLException Implements org. Doc from org. Wait for a row of data to be received from server on an active copy operation.
| |
| writeToCopy | back to summary |
|---|---|
| public void writeToCopy(byte[] data, int off, int siz) throws SQLException Implements org. Doc from org. Writes specified part of given byte array to an open and writable copy operation.
| |
| writeToCopy | back to summary |
|---|---|
| public void writeToCopy(ByteStreamWriter from) throws SQLException Implements org. Doc from org. Writes a ByteStreamWriter to an open and writable copy operation.
| |