Module: Droonga::Serf::Tag

Defined in:
lib/droonga/serf/tag.rb

Constant Summary collapse

HAVE_UNPROCESSED_MESSAGES_TAG_PREFIX =
"buffered-for-"

Class Method Summary collapse

Class Method Details

.accept_messages_newer_thanObject



36
37
38
# File 'lib/droonga/serf/tag.rb', line 36

def accept_messages_newer_than
  "accept-newer-than"
end

.cluster_idObject



32
33
34
# File 'lib/droonga/serf/tag.rb', line 32

def cluster_id
  "cluster_id"
end

.extract_node_name_from_have_unprocessed_messages_tag(tag) ⇒ Object



50
51
52
# File 'lib/droonga/serf/tag.rb', line 50

def extract_node_name_from_have_unprocessed_messages_tag(tag)
  tag.sub(HAVE_UNPROCESSED_MESSAGES_TAG_PREFIX, "")
end

.have_unprocessed_messages_tag?(tag) ⇒ Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/droonga/serf/tag.rb', line 46

def have_unprocessed_messages_tag?(tag)
  tag.start_with?(HAVE_UNPROCESSED_MESSAGES_TAG_PREFIX)
end

.have_unprocessed_messages_tag_for(node_name) ⇒ Object



42
43
44
# File 'lib/droonga/serf/tag.rb', line 42

def have_unprocessed_messages_tag_for(node_name)
 "#{HAVE_UNPROCESSED_MESSAGES_TAG_PREFIX}#{node_name}"
end

.internal_node_nameObject



28
29
30
# File 'lib/droonga/serf/tag.rb', line 28

def internal_node_name
  "internal-name"
end

.node_roleObject



24
25
26
# File 'lib/droonga/serf/tag.rb', line 24

def node_role
  "role"
end

.node_typeObject



20
21
22
# File 'lib/droonga/serf/tag.rb', line 20

def node_type
  "type"
end