Class: Teakflake::DynamicWorkerId

Inherits:
Object
  • Object
show all
Defined in:
lib/teakflake/worker_id_sources/dynamic_worker_id.rb

Constant Summary collapse

RESERVED_MILLIS =
2_000

Instance Method Summary collapse

Constructor Details

#initialize(zookeper, datacenter_id) ⇒ DynamicWorkerId

Returns a new instance of DynamicWorkerId.



21
22
23
24
25
# File 'lib/teakflake/worker_id_sources/dynamic_worker_id.rb', line 21

def initialize(zookeper, datacenter_id)
  @zookeper = zookeper
  @datacenter_id = datacenter_id
  @worker_id = acquire_worker_id
end

Instance Method Details

#assert(time) ⇒ Object



27
28
29
# File 'lib/teakflake/worker_id_sources/dynamic_worker_id.rb', line 27

def assert(time)

end