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.Closeable
The 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.Logger
LOGGER
private static java.util.concurrent.atomic.AtomicReferenceFieldUpdater<QueryExecutorCloseAction,PGStream>
PG_STREAM_UPDATER
private PGStream
pgStream
-
Constructor Summary
Constructors Constructor Description QueryExecutorCloseAction(PGStream pgStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort()
void
close()
boolean
isClosed()
void
sendCloseMessage(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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
sendCloseMessage
public void sendCloseMessage(PGStream pgStream) throws java.io.IOException
- Throws:
java.io.IOException
-
-