Class: Jubatus::Graph::Client::Graph
Instance Method Summary
collapse
-
#add_centrality_query(query) ⇒ Object
-
#add_shortest_path_query(query) ⇒ Object
-
#clear ⇒ Object
-
#create_edge(node_id, e) ⇒ Object
-
#create_edge_here(edge_id, e) ⇒ Object
-
#create_node ⇒ Object
-
#create_node_here(node_id) ⇒ Object
-
#get_centrality(node_id, centrality_type, query) ⇒ Object
-
#get_edge(node_id, edge_id) ⇒ Object
-
#get_node(node_id) ⇒ Object
-
#get_shortest_path(query) ⇒ Object
-
#initialize(host, port, name, timeout_sec = 10) ⇒ Graph
constructor
-
#remove_centrality_query(query) ⇒ Object
-
#remove_edge(node_id, edge_id) ⇒ Object
-
#remove_global_node(node_id) ⇒ Object
-
#remove_node(node_id) ⇒ Object
-
#remove_shortest_path_query(query) ⇒ Object
-
#update_edge(node_id, edge_id, e) ⇒ Object
-
#update_index ⇒ Object
-
#update_node(node_id, property) ⇒ Object
Methods included from Common
check_type, check_types
connect, #do_mix, #get_client, #get_config, #get_name, #get_proxy_status, #get_status, #load, #save, #set_name
Constructor Details
#initialize(host, port, name, timeout_sec = 10) ⇒ Graph
Returns a new instance of Graph.
16
17
18
|
# File 'lib/jubatus/graph/client.rb', line 16
def initialize(host, port, name, timeout_sec=10)
super
end
|
Instance Method Details
#add_centrality_query(query) ⇒ Object
53
54
55
56
|
# File 'lib/jubatus/graph/client.rb', line 53
def add_centrality_query(query)
@jubatus_client.call("add_centrality_query", [query], TBool.new,
[TUserDef.new(PresetQuery)])
end
|
#add_shortest_path_query(query) ⇒ Object
58
59
60
61
|
# File 'lib/jubatus/graph/client.rb', line 58
def add_shortest_path_query(query)
@jubatus_client.call("add_shortest_path_query", [query], TBool.new,
[TUserDef.new(PresetQuery)])
end
|
#clear ⇒ Object
82
83
84
|
# File 'lib/jubatus/graph/client.rb', line 82
def clear
@jubatus_client.call("clear", [], TBool.new, [])
end
|
#create_edge(node_id, e) ⇒ Object
33
34
35
36
|
# File 'lib/jubatus/graph/client.rb', line 33
def create_edge(node_id, e)
@jubatus_client.call("create_edge", [node_id, e], TInt.new(false, 8),
[TString.new, TUserDef.new(Edge)])
end
|
#create_edge_here(edge_id, e) ⇒ Object
106
107
108
109
|
# File 'lib/jubatus/graph/client.rb', line 106
def create_edge_here(edge_id, e)
@jubatus_client.call("create_edge_here", [edge_id, e], TBool.new, [TInt.new(
false, 8), TUserDef.new(Edge)])
end
|
#create_node ⇒ Object
20
21
22
|
# File 'lib/jubatus/graph/client.rb', line 20
def create_node
@jubatus_client.call("create_node", [], TString.new, [])
end
|
#create_node_here(node_id) ⇒ Object
96
97
98
99
|
# File 'lib/jubatus/graph/client.rb', line 96
def create_node_here(node_id)
@jubatus_client.call("create_node_here", [node_id], TBool.new,
[TString.new])
end
|
#get_centrality(node_id, centrality_type, query) ⇒ Object
48
49
50
51
|
# File 'lib/jubatus/graph/client.rb', line 48
def get_centrality(node_id, centrality_type, query)
@jubatus_client.call("get_centrality", [node_id, centrality_type, query],
TFloat.new, [TString.new, TInt.new(true, 4), TUserDef.new(PresetQuery)])
end
|
#get_edge(node_id, edge_id) ⇒ Object
91
92
93
94
|
# File 'lib/jubatus/graph/client.rb', line 91
def get_edge(node_id, edge_id)
@jubatus_client.call("get_edge", [node_id, edge_id], TUserDef.new(Edge),
[TString.new, TInt.new(false, 8)])
end
|
#get_node(node_id) ⇒ Object
86
87
88
89
|
# File 'lib/jubatus/graph/client.rb', line 86
def get_node(node_id)
@jubatus_client.call("get_node", [node_id], TUserDef.new(Node),
[TString.new])
end
|
#get_shortest_path(query) ⇒ Object
#remove_centrality_query(query) ⇒ Object
63
64
65
66
|
# File 'lib/jubatus/graph/client.rb', line 63
def remove_centrality_query(query)
@jubatus_client.call("remove_centrality_query", [query], TBool.new,
[TUserDef.new(PresetQuery)])
end
|
#remove_edge(node_id, edge_id) ⇒ Object
43
44
45
46
|
# File 'lib/jubatus/graph/client.rb', line 43
def remove_edge(node_id, edge_id)
@jubatus_client.call("remove_edge", [node_id, edge_id], TBool.new,
[TString.new, TInt.new(false, 8)])
end
|
#remove_global_node(node_id) ⇒ Object
101
102
103
104
|
# File 'lib/jubatus/graph/client.rb', line 101
def remove_global_node(node_id)
@jubatus_client.call("remove_global_node", [node_id], TBool.new,
[TString.new])
end
|
#remove_node(node_id) ⇒ Object
24
25
26
|
# File 'lib/jubatus/graph/client.rb', line 24
def remove_node(node_id)
@jubatus_client.call("remove_node", [node_id], TBool.new, [TString.new])
end
|
#remove_shortest_path_query(query) ⇒ Object
68
69
70
71
|
# File 'lib/jubatus/graph/client.rb', line 68
def remove_shortest_path_query(query)
@jubatus_client.call("remove_shortest_path_query", [query], TBool.new,
[TUserDef.new(PresetQuery)])
end
|
#update_edge(node_id, edge_id, e) ⇒ Object
38
39
40
41
|
# File 'lib/jubatus/graph/client.rb', line 38
def update_edge(node_id, edge_id, e)
@jubatus_client.call("update_edge", [node_id, edge_id, e], TBool.new,
[TString.new, TInt.new(false, 8), TUserDef.new(Edge)])
end
|
#update_index ⇒ Object
78
79
80
|
# File 'lib/jubatus/graph/client.rb', line 78
def update_index
@jubatus_client.call("update_index", [], TBool.new, [])
end
|
#update_node(node_id, property) ⇒ Object