diff --git a/persistit/core/src/main/java/com/persistit/StreamLoader.java b/persistit/core/src/main/java/com/persistit/StreamLoader.java index f21f63da1..d51460065 100644 --- a/persistit/core/src/main/java/com/persistit/StreamLoader.java +++ b/persistit/core/src/main/java/com/persistit/StreamLoader.java @@ -12,6 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * Portions Copyrighted 2026 3A Systems, LLC */ package com.persistit; @@ -50,8 +51,6 @@ public class StreamLoader extends Task { protected Tree _lastTree; protected int _dataRecordCount = 0; protected int _otherRecordCount = 0; - protected boolean _stop; - protected Exception _lastException; protected TreeSelector _treeSelector; protected boolean _createMissingVolumes; diff --git a/persistit/core/src/main/java/com/persistit/StreamSaver.java b/persistit/core/src/main/java/com/persistit/StreamSaver.java index 5d2b3a77f..76d92ce5d 100644 --- a/persistit/core/src/main/java/com/persistit/StreamSaver.java +++ b/persistit/core/src/main/java/com/persistit/StreamSaver.java @@ -115,8 +115,6 @@ public class StreamSaver extends Task { protected long _dataRecordCount = 0; protected long _otherRecordCount = 0; protected int _cycleCount = DEFAULT_CYCLE_COUNT; - protected boolean _stop; - protected Exception _lastException; protected int _recordCount; protected TreeSelector _treeSelector; @@ -244,7 +242,7 @@ public void setCycleCount(final int count) { */ public void close() throws IOException { writeTimestamp(); - if (!_stop && _lastException == null) + if (!_stop.get() && _lastException == null) _dos.writeChar(RECORD_TYPE_COMPLETION); _lastTree = null; _lastVolume = null; @@ -456,7 +454,7 @@ public void save(final Exchange exchange, final KeyFilter filter) throws Persist } final Key key = exchange.getKey(); key.clear().append(Key.BEFORE); - while (exchange.traverse(Key.GT, filter, Integer.MAX_VALUE) & !_stop) { + while (exchange.traverse(Key.GT, filter, Integer.MAX_VALUE) && !_stop.get()) { writeData(exchange); } writeRecordCount(_dataRecordCount, _otherRecordCount); @@ -497,7 +495,7 @@ public void saveTrees(final String volumeName, final String[] selectedTreeNames) public void saveTrees(final Volume volume, final String[] selectedTreeNames) throws PersistitException, IOException { final String[] treeNames = volume.getTreeNames(); writeComment("Volume " + volume.getPath()); - for (int index = 0; index < treeNames.length & !_stop; index++) { + for (int index = 0; index < treeNames.length && !_stop.get(); index++) { boolean selected = true; if (selectedTreeNames != null) { for (int index2 = 0; selected && index2 < selectedTreeNames.length; index2++) { @@ -567,7 +565,7 @@ public void saveTrees(final TreeSelector treeSelector) throws PersistitException public void saveAll() throws PersistitException, IOException { for (final Volume volume : _persistit.getVolumes()) { - if (_stop) { + if (_stop.get()) { break; } saveTrees(volume, null);