Package com.sleepycat.je.rep.impl

Examples of com.sleepycat.je.rep.impl.RepImpl$InternalReplicatedEnvironment


    protected void postLogCommitHook(LogItem commitItem)
        throws DatabaseException {

        commitVLSN = commitItem.getHeader().getVLSN();
        try {
            RepImpl repImpl = (RepImpl) envImpl;
            repImpl.postLogCommitHook(this);
        } catch (InterruptedException e) {
            throw new ThreadInterruptedException(envImpl, e);
        }
    }
View Full Code Here


    }

    @Override
    protected void postLogAbortHook() {

        RepImpl repImpl = (RepImpl) envImpl;
        repImpl.postLogAbortHook(this);
    }
View Full Code Here

     */
    public ReplicaFeederHandshake(RepNode repNode, NamedChannel namedChannel) {
        this.repNode = repNode;
        this.namedChannel = namedChannel;

        RepImpl repImpl = repNode.getRepImpl();
        replicaNameIdPair = repNode.getNameIdPair();
        maxClockDelta =
            repImpl.getConfigManager().getDuration(MAX_CLOCK_DELTA);
        logger = LoggerUtils.getLogger(getClass());
    }
View Full Code Here

     * Exchange membership information messages.
     */
    private void verifyMembership()
        throws IOException {

        final RepImpl repImpl = repNode.getRepImpl();
        DbConfigManager configManager = repImpl.getConfigManager();
        String groupName = configManager.get(GROUP_NAME);
        NodeType nodeType =
            NODE_TYPE.getEnumerator(configManager.get(NODE_TYPE));

        Message message = protocol.new
            NodeGroupInfo(groupName,
                          repNode.getGroup().getUUID(),
                          replicaNameIdPair,
                          repImpl.getHostName(),
                          repImpl.getPort(),
                          nodeType,
                          repImpl.isDesignatedPrimary());
        protocol.write(message, namedChannel);

        message = protocol.read(namedChannel);

        if (message instanceof NodeGroupInfoReject) {
View Full Code Here

                      1 /* Exclude this one */;
        VLSN rangeFirst = VLSN.NULL_VLSN;
        VLSN rangeLast = VLSN.NULL_VLSN;
        if (feederManager.getEnvImpl() instanceof RepImpl) {
            /* Include replication stream feeders as a load component. */
            RepImpl repImpl = (RepImpl) feederManager.getEnvImpl();
            feeders +=
                repImpl.getRepNode().feederManager().activeReplicaCount();
            VLSNRange range = repImpl.getVLSNIndex().getRange();
            rangeFirst = range.getFirst();
            rangeLast = range.getLast();
        }
        protocol.write(protocol.new FeederInfoResp
                       (feeders, rangeFirst, rangeLast), namedChannel);
View Full Code Here

            FeederReader feederReader = null;
            FeederSyncupReader backwardsReader = null;

            VLSN scanVLSN = startVLSN;
            if (startVLSN.equals(VLSN.NULL_VLSN)) {
                RepImpl repImpl = RepInternal.getRepImpl(rep);
                VLSNRange range = repImpl.getVLSNIndex().getRange();
                if (forward) {
                    scanVLSN = range.getFirst();
                } else {
                    scanVLSN = range.getLast();
                }
View Full Code Here

        /*
         * Cast is done to preserve replication/non replication code
         * boundaries.
         */
        RepImpl repImpl = (RepImpl) envImpl;
        if (!commitToken.getRepenvUUID().equals
                (repImpl.getRepNode().getUUID())) {
            throw new IllegalArgumentException
                ("Replication environment mismatch. " +
                 "The UUID associated with the commit token is: " +
                 commitToken.getRepenvUUID() +
                 " but this replica environment has the UUID: " +
                 repImpl.getRepNode().getUUID());
        }
        Replica replica = repImpl.getRepNode().replica();
        replica.getConsistencyTracker().commitVLSNAwait
            (commitToken.getVLSN(), this);
    }
View Full Code Here

        /*
         * Cast is done to preserve replication/non replication code
         * boundaries.
         */
        RepImpl repImpl = (RepImpl) replicatorImpl;
        Replica replica = repImpl.getRepNode().replica();
        replica.getConsistencyTracker().lagAwait(this);
    }
View Full Code Here

                       CountDownLatch electionLatch) {
            this.repNode = repNode;
            this.maxRetries = maxRetries;
            pendingRetries = maxRetries;
            this.electionLatch = electionLatch;
            final RepImpl repImpl = repNode.getRepImpl();
            final IntConfigParam retriesParam =
                RepParams.ELECTIONS_PRIMARY_RETRIES;
            primaryRetries = (repImpl != null) ?
                 repImpl.getConfigManager().getInt(retriesParam) :
                 Integer.parseInt(retriesParam.getDefault());
        }
View Full Code Here

TOP

Related Classes of com.sleepycat.je.rep.impl.RepImpl$InternalReplicatedEnvironment

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.