Exemple #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void createStates() throws java.io.IOException
        private void CreateStates()
        {
            SimpleStorage <MemberId> memberIdStorage = new SimpleFileStorage <MemberId>(Fsa.get(), _clusterStateDirectory.get(), CORE_MEMBER_ID_NAME, new MemberId.Marshal(), NullLogProvider.Instance);

            memberIdStorage.WriteState(new MemberId(System.Guid.randomUUID()));

            CreateDurableState(LAST_FLUSHED_NAME, new LongIndexMarshal());
            CreateDurableState(LOCK_TOKEN_NAME, new ReplicatedLockTokenState.Marshal(new MemberId.Marshal()));
            CreateDurableState(ID_ALLOCATION_NAME, new IdAllocationState.Marshal());
            CreateDurableState(SESSION_TRACKER_NAME, new GlobalSessionTrackerState.Marshal(new MemberId.Marshal()));

            /* raft state */
            CreateDurableState(RAFT_MEMBERSHIP_NAME, new RaftMembershipState.Marshal());
            CreateDurableState(RAFT_TERM_NAME, new TermState.Marshal());
            CreateDurableState(RAFT_VOTE_NAME, new VoteState.Marshal(new MemberId.Marshal()));
        }
Exemple #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void changeClusterId(org.neo4j.causalclustering.discovery.CoreClusterMember coreMember) throws java.io.IOException
        private void ChangeClusterId(CoreClusterMember coreMember)
        {
            SimpleStorage <ClusterId> clusterIdStorage = new SimpleFileStorage <ClusterId>(_fs, coreMember.ClusterStateDirectory(), CLUSTER_ID_NAME, new ClusterId.Marshal(), NullLogProvider.Instance);

            clusterIdStorage.WriteState(new ClusterId(System.Guid.randomUUID()));
        }