Class: Quark::Quark::Concurrent::FutureCompletion
Overview
internal class that binds a listener to a future
Constant Summary
DatawireQuarkCore::Static::Unassigned
Instance Attribute Summary collapse
Instance Method Summary
collapse
_lazy_statics, static, unlazy_statics
#to_s
Constructor Details
105
106
107
108
109
110
111
112
|
# File 'lib/quark/concurrent.rb', line 105
def initialize(future, listener)
self.__init_fields__
(self).future = future
(self).listener = listener
nil
end
|
Instance Attribute Details
#future ⇒ Object
Returns the value of attribute future.
98
99
100
|
# File 'lib/quark/concurrent.rb', line 98
def future
@future
end
|
#listener ⇒ Object
Returns the value of attribute listener.
98
99
100
|
# File 'lib/quark/concurrent.rb', line 98
def listener
@listener
end
|
Instance Method Details
#__init_fields__ ⇒ Object
163
164
165
166
167
168
169
|
# File 'lib/quark/concurrent.rb', line 163
def __init_fields__()
self.future = nil
self.listener = nil
nil
end
|
#_getClass ⇒ Object
131
132
133
134
135
136
|
# File 'lib/quark/concurrent.rb', line 131
def _getClass()
return "quark.concurrent.FutureCompletion"
nil
end
|
#_getField(name) ⇒ Object
138
139
140
141
142
143
144
145
146
147
148
149
|
# File 'lib/quark/concurrent.rb', line 138
def _getField(name)
if ((name) == ("future"))
return (self).future
end
if ((name) == ("listener"))
return (self).listener
end
return nil
nil
end
|
#_setField(name, value) ⇒ Object
151
152
153
154
155
156
157
158
159
160
161
|
# File 'lib/quark/concurrent.rb', line 151
def _setField(name, value)
if ((name) == ("future"))
(self).future = ::DatawireQuarkCore.cast(value) { ::Quark.quark.concurrent.Future }
end
if ((name) == ("listener"))
(self).listener = ::DatawireQuarkCore.cast(value) { ::Quark.quark.concurrent.FutureListener }
end
nil
end
|
#fireEvent ⇒ Object
124
125
126
127
128
129
|
# File 'lib/quark/concurrent.rb', line 124
def fireEvent()
(self).listener.onFuture((self).future)
nil
end
|
#getContext ⇒ Object
117
118
119
120
121
122
|
# File 'lib/quark/concurrent.rb', line 117
def getContext()
return (self).future
nil
end
|