func (m *msgRingGroupPullReplicationTester) MsgToOtherReplicas(msg ring.Msg, partition uint32, timeout time.Duration) { prm, ok := msg.(*groupPullReplicationMsg) 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.Free() }
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 *msgRingGroupPullReplicationTester) MsgToNode(msg ring.Msg, nodeID uint64, timeout time.Duration) { m.lock.Lock() m.msgToNodeIDs = append(m.msgToNodeIDs, nodeID) m.lock.Unlock() msg.Free() }
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 *msgRingPlaceholder) MsgToOtherReplicas(msg ring.Msg, partition uint32, timeout time.Duration) { m.lock.Lock() m.msgToPartitions = append(m.msgToPartitions, partition) m.lock.Unlock() msg.Free() }
func (m *msgRingPlaceholder) MsgToNode(msg ring.Msg, nodeID uint64, timeout time.Duration) { m.lock.Lock() m.msgToNodeIDs = append(m.msgToNodeIDs, nodeID) m.lock.Unlock() msg.Free() }
func (m *msgRingPullReplicationTester) MsgToNode(nodeID uint64, msg ring.Msg) { m.lock.Lock() m.msgToNodeIDs = append(m.msgToNodeIDs, nodeID) m.lock.Unlock() msg.Done() }