예제 #1
0
        private ReadReplicaInfo ReadReplicaInfo(string dbName)
        {
            ClientConnectorAddresses clientConnectorAddresses = new ClientConnectorAddresses(Collections.emptyList());
            AdvertisedSocketAddress  catchupServerAddress     = new AdvertisedSocketAddress("hostname", 1234);

            return(new ReadReplicaInfo(clientConnectorAddresses, catchupServerAddress, dbName));
        }
예제 #2
0
 internal ReadWriteEndPoint(ClientConnectorAddresses clientConnectorAddresses, RoleInfo role, System.Guid memberId, IList <string> groups, string dbName)
 {
     this.ClientConnectorAddresses = clientConnectorAddresses;
     this.RoleConflict             = role;
     this.MemberIdConflict         = memberId;
     this.GroupsConflict           = groups;
     this.DbNameConflict           = dbName;
 }
예제 #3
0
        private CoreServerInfo CoreServerInfo(string dbName)
        {
            AdvertisedSocketAddress  raftServer       = new AdvertisedSocketAddress("hostname", 1234);
            AdvertisedSocketAddress  catchupServer    = new AdvertisedSocketAddress("hostname", 1234);
            ClientConnectorAddresses clientConnectors = new ClientConnectorAddresses(Collections.emptyList());
            bool refuseToBeLeader = false;

            return(new CoreServerInfo(raftServer, catchupServer, clientConnectors, dbName, refuseToBeLeader));
        }
예제 #4
0
        private static ReadReplicaInfo ReadReplicaInfo(params string[] groupNames)
        {
            ClientConnectorAddresses clientConnectorAddresses = new ClientConnectorAddresses(Collections.emptyList());
            AdvertisedSocketAddress  catchupServerAddress     = new AdvertisedSocketAddress("hostname", 2468);
            ISet <string>            groups          = new HashSet <string>(Arrays.asList(groupNames));
            ReadReplicaInfo          readReplicaInfo = new ReadReplicaInfo(clientConnectorAddresses, catchupServerAddress, groups, "dbName");

            return(readReplicaInfo);
        }
예제 #5
0
        private static CoreServerInfo CoreServerInfo(params string[] groupNames)
        {
            AdvertisedSocketAddress  anyRaftAddress         = new AdvertisedSocketAddress("hostname", 1234);
            AdvertisedSocketAddress  anyCatchupServer       = new AdvertisedSocketAddress("hostname", 5678);
            ClientConnectorAddresses clientConnectorAddress = new ClientConnectorAddresses(Collections.emptyList());
            ISet <string>            groups = new HashSet <string>(Arrays.asList(groupNames));

            return(new CoreServerInfo(anyRaftAddress, anyCatchupServer, clientConnectorAddress, groups, "dbName", false));
        }