T
- Type of SourceData that will be writtenpublic class BuffersInputStream.Connection<T extends SourceData>
extends java.lang.Object
implements java.io.Closeable
Constructor and Description |
---|
Connection() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush()
Flush any submitted data for this work unit.
|
T |
getCurrent()
Wait if needed and obtain a free SourceData for writing.
|
T |
getCurrentWithSize(int size)
Wait if needed and obtain a free SourceData for writing.
|
boolean |
hasAvailableBuffer()
Check if there is a SourceData available without waiting.
|
boolean |
hasUnflushedData()
Is there any data to flush?
|
void |
reset()
Release any SourceData obtained by getCurrent if submit is not called.
|
void |
sendEndOfMessage() |
void |
submit()
Submit the buffer returned by getCurrent.
|
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public void flush()
public boolean hasUnflushedData()
public void reset()
public void submit()
public void sendEndOfMessage()
public T getCurrent()
getCurrentWithSize(int)
.public T getCurrentWithSize(int size)
size
- Number of bytes needed for bufferpublic boolean hasAvailableBuffer()
Copyright (C) 2003-2021 SQLstream, Inc.