Statement.cancel () and its security guarantee (s)

Unfortunately, the jdbc specification is silent on warranties Statement.cancel().

The only thing javadoc pointed out is that it Statement.cancel()is a thread safe .
But:

  • Is it guaranteed to cancel()always work? (so that the thread that is currently executing Statementis immediately unlocked and continues)
  • Is it guaranteed that cancel()it will not be blocked and (more or less) immediately return?
+3
source share
2 answers

Is it guaranteed that the cancel () function will always work?

. , . , , UnsupportedOperationException

, cancel() ( )

. cancel() . , .

+3

javadoc:

, SQL

. , Statement.cancel() , , Java RE.

, , /.

+2

Source: https://habr.com/ru/post/1783423/


All Articles