Skip to content

Commit b75dd50

Browse files
committed
Made timeout configurable
Signed-off-by: Bart Hanssens <bart.hanssens@fedict.be>
1 parent b215c2e commit b75dd50

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

core/sail/api/src/main/java/org/eclipse/rdf4j/sail/helpers/AbstractSail.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ public AbstractSail() {
130130
* Methods *
131131
*---------*/
132132

133+
/**
134+
* Set connection timeout on shutdown (in ms).
135+
*
136+
* @param connectionTimeOut timeout (in ms)
137+
*/
138+
public void setConnectionTimeOut(long connectionTimeOut) {
139+
this.connectionTimeOut = connectionTimeOut;
140+
}
141+
133142
@Override
134143
public void setDataDir(File dataDir) {
135144
if (isInitialized()) {
@@ -212,7 +221,7 @@ public void shutDown()
212221
if (!activeConnections.isEmpty()) {
213222
logger.debug("Waiting for active connections to close before shutting down...");
214223
try {
215-
activeConnections.wait(DEFAULT_CONNECTION_TIMEOUT);
224+
activeConnections.wait(connectionTimeOut);
216225
}
217226
catch (InterruptedException e) {
218227
// ignore and continue

0 commit comments

Comments
 (0)