func (m *msgRingPullReplicationTester) MsgToOtherReplicas(ringVersion int64, partition uint32, msg ring.Msg) { prm, ok := msg.(*pullReplicationMsg) if ok { m.lock.Lock() h := make([]byte, len(prm.header)) copy(h, prm.header) m.headerToPartitions = append(m.headerToPartitions, h) b := make([]byte, len(prm.body)) copy(b, prm.body) m.bodyToPartitions = append(m.bodyToPartitions, b) m.lock.Unlock() } msg.Done() }
func (m *msgRingPlaceholder) MsgToOtherReplicas(ringVersion int64, partition uint32, msg ring.Msg) { m.lock.Lock() m.msgToPartitions = append(m.msgToPartitions, partition) m.lock.Unlock() msg.Done() }
func (m *msgRingPlaceholder) MsgToNode(nodeID uint64, msg ring.Msg) { m.lock.Lock() m.msgToNodeIDs = append(m.msgToNodeIDs, nodeID) m.lock.Unlock() msg.Done() }
func (m *msgRingPullReplicationTester) MsgToNode(nodeID uint64, msg ring.Msg) { m.lock.Lock() m.msgToNodeIDs = append(m.msgToNodeIDs, nodeID) m.lock.Unlock() msg.Done() }