// init initializes the queue data.
513537
func (q *Queue) init() error {
	// Create a new LevelDB Iterator.
	iter := q.db.NewIterator(nil, nil)
	defer iter.Release()

	// Set queue head to the first item.
	if iter.First() {
		q.head = keyToID(iter.Key()) - 1
	}

	// Set queue tail to the last item.
	if iter.Last() {
		q.tail = keyToID(iter.Key())
	}

	return iter.Error()
}
1345202
func (d *Dispatcher) Init(source interface{}) {
	d.source = source
	d.callbacks = make(map[Type][]Callback)
}
1118525
func (ls LogicalSort) Init(ctx sessionctx.Context) *LogicalSort {
	ls.baseLogicalPlan = newBaseLogicalPlan(ctx, TypeSort, &ls)
	return &ls
}
218557
func (b *sqsBroker) Init(opts ...broker.Option) error {
	for _, o := range opts {
		o(&b.options)
	}

	return nil
}
447619
func (f *fen) Init() (err error) {
	f.p, err = f.cf.portCreate()
	return
}
432879
func (s *scanner) init(buf string) {
	s.buf = buf
	s.pos = 0
	s.start = 0
	s.width = 0
	s.accept = nil
}
369617
func (mr *MockServiceDiscoveryMockRecorder) Init() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockServiceDiscovery)(nil).Init))
}
1337490
func (m *MultiLRUCache) Init(buckets, bucket_capacity uint) {
	m.buckets = buckets
	m.cache = make([]*LRUCache, buckets)
	for i := uint(0); i < buckets; i++ {
		m.cache[i] = NewLRUCache(bucket_capacity)
	}
}
331312
func (c *Context) init(ctx *fasthttp.RequestCtx) {
	c.RequestCtx = ctx
	c.data = nil
	c.index = -1
	c.Serialize = Serialize
}
944681
func (p *MemProvider) Init(maxLifetime int64, _ string) error {
	p.lock.Lock()
	p.maxLifetime = maxLifetime
	p.lock.Unlock()
	return nil
}
397973
func (c *removeCommand) Init(args []string) error {
	if len(args) == 0 {
		return errors.Errorf("no offers specified")
	}
	c.offers = args
	return nil
}
1155725
func (w *KeyedValue) init() {
	w.values = make(map[string]interface{})
	w.waiters = make(map[string]*Value)
}
943341
func (l *MutexD) Init() {
	if !l.initialized {
		l.locks = make(map[string]int64)
		l.signals = make(chan *lockSignal, 1000)
		go l.listner()
		l.initialized = true
	}
}
833485
func (d *FakeStateDriver) Init(instInfo *core.InstanceInfo) error {
	d.TestState = make(map[string]valueData)

	return nil
}
251042
func init() {
	for out, _ := range collector.DataOutput {
		collector.DataOutputLib = append(collector.DataOutputLib, out)
	}
	sort.Strings(collector.DataOutputLib)
}
1325349
func (s *Storage) Init() error {
	dbPath = s.config.Stat.LevelDB.Path
	return nil
}
1278273
func (c *Cache) init() {
	if !atomic.CompareAndSwapUint32(&c.initializedCount, 0, 1) {
		return
	}

	c.mu.Lock()
	c.store, _ = newring(ringShards)
	c.mu.Unlock()
}