Github user kinow commented on a diff in the pull request: https://github.com/apache/jena/pull/459#discussion_r209416490 --- Diff: jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java --- @@ -151,50 +151,24 @@ public long getRequestsBad() { return counters.value(CounterName.RequestsBad) ; } - /** Counter of active read transactions */ - public AtomicLong activeReadTxn = new AtomicLong(0) ; + /** Counter of active transactions */ + public AtomicLong activeTxn = new AtomicLong(0) ; - /** Counter of active write transactions */ - public AtomicLong activeWriteTxn = new AtomicLong(0) ; + /** Cumulative counter of transactions */ + public AtomicLong totalTxn = new AtomicLong(0) ; - /** Cumulative counter of read transactions */ - public AtomicLong totalReadTxn = new AtomicLong(0) ; - - /** Cumulative counter of writer transactions */ - public AtomicLong totalWriteTxn = new AtomicLong(0) ; - - public void startTxn(ReadWrite mode) - { - switch(mode) - { - case READ: - activeReadTxn.getAndIncrement() ; - totalReadTxn.getAndIncrement() ; - break ; - case WRITE: - activeWriteTxn.getAndIncrement() ; - totalWriteTxn.getAndIncrement() ; - break ; - } + public void startTxn(TxnType mode) { + activeTxn.getAndIncrement(); + totalTxn.getAndIncrement(); } - public void finishTxn(ReadWrite mode) --- End diff -- Should we also remove unused `#checkShutdown` and `requestCounter` ?
---