Top Description Fields Constructors Methods
org.postgresql.core

public Class QueryExecutorCloseAction

extends Object
implements Closeable
Class Inheritance
All Implemented Interfaces
java.io.Closeable, java.lang.AutoCloseable
Imports
org.checkerframework.checker.nullness.qual.Nullable, java.io.Closeable, .IOException, java.util.concurrent.atomic.AtomicReferenceFieldUpdater, java.util.logging.Level, .Logger

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

Modifier and TypeField and Description
private static final Logger
private static final AtomicReferenceFieldUpdater<QueryExecutorCloseAction, @Nullable PGStream>
private volatile @Nullable PGStream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public boolean
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER
PG_STREAM_UPDATERback to summary
private static final AtomicReferenceFieldUpdater<QueryExecutorCloseAction, @Nullable PGStream> PG_STREAM_UPDATER
Annotations
@SuppressWarnings:RedundantCast
pgStreamback to summary
private volatile @Nullable PGStream pgStream

Constructor Detail

QueryExecutorCloseActionback to summary
public QueryExecutorCloseAction(PGStream pgStream)

Method Detail

abortback to summary
public void abort()
closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
isClosedback to summary
public boolean isClosed()
sendCloseMessageback to summary
public void sendCloseMessage(PGStream pgStream) throws IOException