Search in sources :

Example 1 with Marshal

use of org.neo4j.causalclustering.identity.MemberId.Marshal in project neo4j by neo4j.

the class DumpClusterState method dump.

void dump() throws IOException {
    SimpleStorage<MemberId> memberIdStorage = new SimpleFileStorage<>(fs, clusterStateDirectory, CORE_MEMBER_ID_NAME, new Marshal(), NullLogProvider.getInstance());
    if (memberIdStorage.exists()) {
        MemberId memberId = memberIdStorage.readState();
        out.println(CORE_MEMBER_ID_NAME + ": " + memberId);
    }
    dumpState(LAST_FLUSHED_NAME, new LongIndexMarshal());
    dumpState(LOCK_TOKEN_NAME, new ReplicatedLockTokenState.Marshal(new Marshal()));
    dumpState(ID_ALLOCATION_NAME, new IdAllocationState.Marshal());
    dumpState(SESSION_TRACKER_NAME, new GlobalSessionTrackerState.Marshal(new Marshal()));
    /* raft state */
    dumpState(RAFT_MEMBERSHIP_NAME, new RaftMembershipState.Marshal());
    dumpState(RAFT_TERM_NAME, new TermState.Marshal());
    dumpState(RAFT_VOTE_NAME, new VoteState.Marshal(new Marshal()));
}
Also used : IdAllocationState(org.neo4j.causalclustering.core.state.machines.id.IdAllocationState) GlobalSessionTrackerState(org.neo4j.causalclustering.core.replication.session.GlobalSessionTrackerState) MemberId(org.neo4j.causalclustering.identity.MemberId) SimpleFileStorage(org.neo4j.causalclustering.core.state.storage.SimpleFileStorage) VoteState(org.neo4j.causalclustering.core.consensus.vote.VoteState) ReplicatedLockTokenState(org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenState) RaftMembershipState(org.neo4j.causalclustering.core.consensus.membership.RaftMembershipState) Marshal(org.neo4j.causalclustering.identity.MemberId.Marshal) StateMarshal(org.neo4j.causalclustering.core.state.storage.StateMarshal) TermState(org.neo4j.causalclustering.core.consensus.term.TermState)

Aggregations

RaftMembershipState (org.neo4j.causalclustering.core.consensus.membership.RaftMembershipState)1 TermState (org.neo4j.causalclustering.core.consensus.term.TermState)1 VoteState (org.neo4j.causalclustering.core.consensus.vote.VoteState)1 GlobalSessionTrackerState (org.neo4j.causalclustering.core.replication.session.GlobalSessionTrackerState)1 IdAllocationState (org.neo4j.causalclustering.core.state.machines.id.IdAllocationState)1 ReplicatedLockTokenState (org.neo4j.causalclustering.core.state.machines.locks.ReplicatedLockTokenState)1 SimpleFileStorage (org.neo4j.causalclustering.core.state.storage.SimpleFileStorage)1 StateMarshal (org.neo4j.causalclustering.core.state.storage.StateMarshal)1 MemberId (org.neo4j.causalclustering.identity.MemberId)1 Marshal (org.neo4j.causalclustering.identity.MemberId.Marshal)1