当前位置: 首页>>代码示例>>Golang>>正文


Golang StatusConsumer.Join方法代码示例

本文整理汇总了Golang中goshawkdb/io/server.StatusConsumer.Join方法的典型用法代码示例。如果您正苦于以下问题:Golang StatusConsumer.Join方法的具体用法?Golang StatusConsumer.Join怎么用?Golang StatusConsumer.Join使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在goshawkdb/io/server.StatusConsumer的用法示例。


在下文中一共展示了StatusConsumer.Join方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: Status

func (f *frame) Status(sc *server.StatusConsumer) {
	sc.Emit(f.String())
	readHistogram := make([]int, 4)
	for node := f.reads.First(); node != nil; node = node.Next() {
		readHistogram[int(node.Value.(txnStatus))]++
	}
	writeHistogram := make([]int, 4)
	for node := f.writes.First(); node != nil; node = node.Next() {
		writeHistogram[int(node.Value.(txnStatus))]++
	}
	sc.Emit(fmt.Sprintf("- Read Count: %v %v", f.reads.Len(), readHistogram))
	sc.Emit(fmt.Sprintf("- Uncommitted Read Count: %v", f.uncommittedReads))
	sc.Emit(fmt.Sprintf("- Learnt future reads: %v", len(f.learntFutureReads)))
	sc.Emit(fmt.Sprintf("- Write Count: %v %v", f.writes.Len(), writeHistogram))
	sc.Emit(fmt.Sprintf("- Uncommitted Write Count: %v", f.uncommittedWrites))
	sc.Emit(fmt.Sprintf("- RW Present: %v", f.rwPresent))
	sc.Emit(fmt.Sprintf("- Mask: %v", f.mask))
	sc.Emit(fmt.Sprintf("- Current State: %v", f.currentState))
	sc.Emit(fmt.Sprintf("- Locked? %v", f.isLocked()))
	sc.Emit(fmt.Sprintf("- Roll scheduled/active? %v/%v", f.rollScheduled, f.rollActive))
	sc.Emit(fmt.Sprintf("- DescendentOnDisk? %v", f.onDisk))
	sc.Emit(fmt.Sprintf("- Child == nil? %v", f.child == nil))
	sc.Emit(fmt.Sprintf("- Parent == nil? %v", f.parent == nil))
	if f.parent != nil {
		f.parent.Status(sc.Fork())
	}
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:28,代码来源:frame.go

示例2: status

func (i *instance) status(instId instanceId, sc *server.StatusConsumer) {
	sc.Emit(instId.String())
	sc.Emit(fmt.Sprintf("- Promise Number: %v", i.promiseNum))
	sc.Emit(fmt.Sprintf("- Accepted Number: %v", i.acceptedNum))
	sc.Emit(fmt.Sprintf("- Accepted Ballot: %v", i.accepted))
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:7,代码来源:acceptormanager.go

示例3: status

func (cm *ConnectionManager) status(sc *server.StatusConsumer) {
	sc.Emit(fmt.Sprintf("Address: %v", cm.localHost))
	sc.Emit(fmt.Sprintf("Boot Count: %v", cm.BootCount))
	sc.Emit(fmt.Sprintf("Current Topology: %v", cm.topology))
	serverConnections := make([]string, 0, len(cm.servers))
	for server := range cm.servers {
		serverConnections = append(serverConnections, server)
	}
	sc.Emit(fmt.Sprintf("Senders: %v", len(cm.senders)))
	rms := make([]common.RMId, 0, len(cm.rmToServer))
	for rmId := range cm.rmToServer {
		rms = append(rms, rmId)
	}
	sc.Emit(fmt.Sprintf("Active Server RMIds: %v", rms))
	sc.Emit(fmt.Sprintf("Active Server Connections: %v", serverConnections))
	sc.Emit(fmt.Sprintf("Desired Server Connections: %v", cm.desired))
	for _, conn := range cm.servers {
		conn.Status(sc.Fork())
	}
	sc.Emit(fmt.Sprintf("Client Connection Count: %v", len(cm.connCountToClient)))
	cm.connCountToClient[0].(*client.LocalConnection).Status(sc.Fork())
	for _, conn := range cm.connCountToClient {
		if c, ok := conn.(*Connection); ok {
			c.Status(sc.Fork())
		}
	}
	cm.Dispatchers.VarDispatcher.Status(sc.Fork())
	cm.Dispatchers.ProposerDispatcher.Status(sc.Fork())
	cm.Dispatchers.AcceptorDispatcher.Status(sc.Fork())
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:31,代码来源:connectionmanager.go

示例4: Status

func (a *Acceptor) Status(sc *server.StatusConsumer) {
	sc.Emit(fmt.Sprintf("Acceptor for %v", a.txnId))
	sc.Emit(fmt.Sprintf("- Current State: %v", a.currentState))
	sc.Emit(fmt.Sprintf("- Outcome determined? %v", a.outcome != nil))
	sc.Emit(fmt.Sprintf("- Pending TLC: %v", a.pendingTLC))
	a.ballotAccumulator.Status(sc.Fork())
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:8,代码来源:acceptor.go

示例5: Status

func (sts *SimpleTxnSubmitter) Status(sc *server.StatusConsumer) {
	txnIds := make([]common.TxnId, 0, len(sts.outcomeConsumers))
	for txnId := range sts.outcomeConsumers {
		txnIds = append(txnIds, txnId)
	}
	sc.Emit(fmt.Sprintf("SimpleTxnSubmitter: live TxnIds: %v", txnIds))
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:8,代码来源:simpletxnsubmitter.go

示例6: Status

func (vm *VarManager) Status(sc *server.StatusConsumer) {
	sc.Emit(fmt.Sprintf("- Active Vars: %v", len(vm.active)))
	sc.Emit(fmt.Sprintf("- Callbacks: %v", len(vm.callbacks)))
	sc.Emit(fmt.Sprintf("- Beater live? %v", vm.beaterLive))
	for _, v := range vm.active {
		v.Status(sc.Fork())
	}
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:9,代码来源:varmanager.go

示例7: Status

func (pm *ProposerManager) Status(sc *server.StatusConsumer) {
	sc.Emit(fmt.Sprintf("Live proposers: %v", len(pm.proposers)))
	for _, prop := range pm.proposers {
		prop.Status(sc.Fork())
	}
	sc.Emit(fmt.Sprintf("Live proposals: %v", len(pm.proposals)))
	for _, prop := range pm.proposals {
		prop.Status(sc.Fork())
	}
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:11,代码来源:proposermanager.go

示例8: Status

func (p *Proposer) Status(sc *server.StatusConsumer) {
	sc.Emit(fmt.Sprintf("Proposer for %v", p.txnId))
	sc.Emit(fmt.Sprintf("- Mode: %v", p.mode))
	sc.Emit(fmt.Sprintf("- Current state: %v", p.currentState))
	sc.Emit("- Outcome Accumulator")
	p.outcomeAccumulator.Status(sc.Fork())
	sc.Emit(fmt.Sprintf("- Locally Complete? %v", p.locallyCompleted))
	if p.txn != nil {
		sc.Emit("- Txn")
		p.txn.Status(sc.Fork())
	}
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:13,代码来源:proposer.go

示例9: Status

func (v *Var) Status(sc *server.StatusConsumer) {
	sc.Emit(v.UUId.String())
	if v.positions == nil {
		sc.Emit("- Positions: unknown")
	} else {
		sc.Emit(fmt.Sprintf("- Positions: %v", v.positions))
	}
	sc.Emit("- CurFrame:")
	v.curFrame.Status(sc.Fork())
	sc.Emit(fmt.Sprintf("- Subscribers: %v", len(v.subscribers)))
	sc.Emit(fmt.Sprintf("- Idle? %v", v.isIdle()))
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:13,代码来源:var.go

示例10: Status

func (oa *OutcomeAccumulator) Status(sc *server.StatusConsumer) {
	outcomeToAcceptors := make(map[*txnOutcome][]common.RMId)
	acceptors := make([]common.RMId, 0, len(oa.acceptorIdToTxnOutcome))
	for rmId, outcome := range oa.acceptorIdToTxnOutcome {
		acceptors = append(acceptors, rmId)
		if list, found := outcomeToAcceptors[outcome]; found {
			outcomeToAcceptors[outcome] = append(list, rmId)
		} else {
			outcomeToAcceptors[outcome] = []common.RMId{rmId}
		}
	}
	sc.Emit(fmt.Sprintf("- known outcomes from acceptors: %v", acceptors))
	sc.Emit(fmt.Sprintf("- unique outcomes: %v", outcomeToAcceptors))
	sc.Emit(fmt.Sprintf("- outcome decided? %v", oa.decidingOutcome != nil))
	sc.Emit(fmt.Sprintf("- pending TGCs from: %v", oa.pendingTGC))
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:17,代码来源:outcomeaccumulator.go

示例11: Status

func (am *AcceptorManager) Status(sc *server.StatusConsumer) {
	s := sc.Fork()
	s.Emit(fmt.Sprintf("- Live Instances: %v", len(am.instances)))
	for instId, inst := range am.instances {
		inst.status(instId, s.Fork())
	}
	s.Join()
	s = sc.Fork()
	s.Emit(fmt.Sprintf("- Acceptors: %v", len(am.acceptors)))
	for _, aInst := range am.acceptors {
		if acc := aInst.acceptor; acc != nil {
			acc.Status(s.Fork())
		}
	}
	s.Join()
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:17,代码来源:acceptormanager.go

示例12: status

func (lc *LocalConnection) status(sc *server.StatusConsumer) {
	sc.Emit("LocalConnection")
	lc.submitter.Status(sc.Fork())
	sc.Join()
}
开发者ID:chang290,项目名称:server,代码行数:5,代码来源:localconnection.go


注:本文中的goshawkdb/io/server.StatusConsumer.Join方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。