/*- * Copyright (c) 2001, 2020 Oracle and/or its affiliates. All rights reserved. * * See the file LICENSE for license information. * * $Id$ */ package db_gui; import com.sleepycat.db.*; import db_gui.envpage.EnvConfig; import java.io.File; import java.io.FileNotFoundException; import java.util.LinkedList; import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.logging.Level; import java.util.logging.Logger; import javafx.application.Platform; import javafx.scene.control.Button; import javafx.scene.control.Tab; import javafx.scene.control.TextArea; import javafx.stage.Stage; /** * BDBState is a singleton that contains current BDB environment, database, * cursor, and transaction. It also contains the current feedback box for * printing feedback to the user, and the messageQueue that buffers the messages * to be printed to the feedback box. */ public class BDBState implements ErrorHandler, FeedbackHandler, MessageHandler { private static final BDBState instance = new BDBState(); private Environment env; private Database db; private Cursor cursor; private Transaction txn; private Stage mainStage; private TextArea feedbackBox; private Button disableButton, enableButton; private boolean feedbackBoxEnabled; private boolean transactional; private final List tabs; private final List