Package com.sleepycat.je.rep.impl.node

Examples of com.sleepycat.je.rep.impl.node.RepNode


    public int getRequiredAckCount() {
        return requiredAckCount;
    }

    public int getCurrentRequiredAckCount() {
        RepNode repNode = ((RepImpl)envImpl).getRepNode();
        return repNode.minAckNodes(getCommitDurability()) - 1;
    }
View Full Code Here


        EnvironmentConfig envConfig = new EnvironmentConfig();
        envConfig.setTransactional(true);
        envConfig.setAllowCreate(createEnv);
        ReplicatedEnvironment repEnv =
            new ReplicatedEnvironment(envHome, repConfig, envConfig);
        RepNode repNode = RepInternal.getRepImpl(repEnv).getRepNode();

        System.err.println("Handle created:" + repEnv +
                           "  Node idling indefinitely...");
        try {
            while (true) {
                System.out.println(new Date() +
                                   " State:" + repEnv.getState() + " " +
                                   " VLSN range:" +
                                   repNode.getVLSNIndex().getRange() +
                                   repNode.dumpState());
                Thread.sleep(pollIntervalMs);
            }
        } catch (InterruptedException e) {
            System.err.println("Exiting");
        }
View Full Code Here

                }
                txn = null;
            }
            if (ok) {
                /* RepNode may be null during shutdown. [#17424] */
                RepNode repNode = repImpl.getRepNode();
                if (repNode != null) {
                    repNode.updateGroupInfo(nameIdPair, barrierState);
                }
            }
        }

        return true;
View Full Code Here

        throws ReplicaConsistencyException, DatabaseException {

        startupTracker.start(Phase.TOTAL_JOIN_GROUP);
        try {
            if (repNode == null) {
                repNode = new RepNode(this, replay, nodeState);
            }

            return repNode.joinGroup(consistency, initialElectionPolicy);
        catch (IOException ioe) {
            throw EnvironmentFailureException.unexpectedException
View Full Code Here

         * The volatile repNode field might be modified by joinGroup(),
         * leaveGroup, or close(), which are synchronized. Keep this method
         * unsynchronized, assign to a temporary field to guard against a
         * change.
         */
        RepNode useNode = repNode;
        if (useNode == null) {
            return false;
        }
        return useNode.isMaster();
    }
View Full Code Here

    public int getRequiredAckCount() {
        return requiredAckCount;
    }

    public int getCurrentRequiredAckCount() {
        RepNode repNode = ((RepImpl)envImpl).getRepNode();
        return repNode.minAckNodes(getCommitDurability()) - 1;
    }
View Full Code Here

                }
                txn = null;
            }
            if (ok) {
                /* RepNode may be null during shutdown. [#17424] */
                RepNode repNode = repImpl.getRepNode();
                if (repNode != null) {
                    repNode.updateGroupInfo(nameIdPair, barrierState);
                }
            }
        }

        return true;
View Full Code Here

                  QuorumPolicy initialElectionPolicy)
        throws ReplicaConsistencyException, DatabaseException {

        try {
            if (repNode == null) {
                repNode = new RepNode(this, replay, nodeState);
            }
            return repNode.joinGroup(consistency, initialElectionPolicy);
        catch (IOException ioe) {
            throw EnvironmentFailureException.unexpectedException
                (this, "Problem attempting to join on " + getSocket(), ioe);
View Full Code Here

         * The volatile repNode field might be modified by joinGroup(),
         * leaveGroup, or close(), which are synchronized. Keep this method
         * unsynchronized, assign to a temporary field to guard against a
         * change.
         */
        RepNode useNode = repNode;
        if (useNode == null) {
            return false;
        }
        return useNode.isMaster();
    }
View Full Code Here

        EnvironmentConfig envConfig = new EnvironmentConfig();
        envConfig.setTransactional(true);
        envConfig.setAllowCreate(createEnv);
        ReplicatedEnvironment repEnv =
            new ReplicatedEnvironment(envHome, repConfig, envConfig);
        RepNode repNode = RepInternal.getRepImpl(repEnv).getRepNode();

        System.err.println("Handle created:" + repEnv +
                           "  Node idling indefinitely...");
        try {
            while (true) {
                System.out.println(new Date() +
                                   " State:" + repEnv.getState() + " " +
                                   " VLSN range:" +
                                   repNode.getVLSNIndex().getRange() +
                                   repNode.dumpState());
                Thread.sleep(pollIntervalMs);
            }
        } catch (InterruptedException e) {
            System.err.println("Exiting");
        }
View Full Code Here

TOP

Related Classes of com.sleepycat.je.rep.impl.node.RepNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.