Package org.postgresql.core
Class QueryExecutorCloseAction
- java.lang.Object
-
- org.postgresql.core.QueryExecutorCloseAction
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class QueryExecutorCloseAction extends java.lang.Object implements java.io.CloseableThe action performs connection cleanup, so it is properly terminated from the backend point of view. Implementation note: it should keep only the minimum number of object references to reduce heap usage in case the user abandons connection without closing it first.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.LoggerLOGGERprivate static java.util.concurrent.atomic.AtomicReferenceFieldUpdater<QueryExecutorCloseAction,PGStream>PG_STREAM_UPDATERprivate PGStreampgStream
-
Constructor Summary
Constructors Constructor Description QueryExecutorCloseAction(PGStream pgStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()voidclose()booleanisClosed()voidsendCloseMessage(PGStream pgStream)
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
PG_STREAM_UPDATER
private static final java.util.concurrent.atomic.AtomicReferenceFieldUpdater<QueryExecutorCloseAction,PGStream> PG_STREAM_UPDATER
-
pgStream
private volatile PGStream pgStream
-
-
Constructor Detail
-
QueryExecutorCloseAction
public QueryExecutorCloseAction(PGStream pgStream)
-
-
Method Detail
-
isClosed
public boolean isClosed()
-
abort
public void abort()
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
sendCloseMessage
public void sendCloseMessage(PGStream pgStream) throws java.io.IOException
- Throws:
java.io.IOException
-
-