33import com .github .benmanes .caffeine .cache .Cache ;
44import com .google .protobuf .Any ;
55import com .google .protobuf .Empty ;
6- import com .google .protobuf .GeneratedMessageV3 ;
6+ import com .google .protobuf .GeneratedMessage ;
77import io .eigr .functions .protocol .Protocol ;
88import io .eigr .functions .protocol .actors .ActorOuterClass ;
99import io .eigr .spawn .api .exceptions .ActorCreationException ;
@@ -104,7 +104,7 @@ protected static void spawnAllActors(List<ActorOuterClass.ActorId> actorIds, Spa
104104 * @return an Optional containing, or not, the response object to the Action call
105105 * @since 0.0.1
106106 */
107- public <T extends GeneratedMessageV3 > Optional <T > invoke (String action , Class <T > outputType ) throws ActorInvocationException {
107+ public <T extends GeneratedMessage > Optional <T > invoke (String action , Class <T > outputType ) throws ActorInvocationException {
108108 Optional <T > res = invokeActor (action , Empty .getDefaultInstance (), outputType , Optional .empty ());
109109 return res .map (outputType ::cast );
110110
@@ -122,7 +122,7 @@ public <T extends GeneratedMessageV3> Optional<T> invoke(String action, Class<T>
122122 * @return an Optional containing, or not, the response object to the Action call
123123 * @since 0.0.1
124124 */
125- public <T extends GeneratedMessageV3 > Optional <T > invoke (String action , Class <T > outputType , InvocationOpts opts ) throws ActorInvocationException {
125+ public <T extends GeneratedMessage > Optional <T > invoke (String action , Class <T > outputType , InvocationOpts opts ) throws ActorInvocationException {
126126 Optional <T > res = invokeActor (action , Empty .getDefaultInstance (), outputType , Optional .ofNullable (opts ));
127127 return res .map (outputType ::cast );
128128
@@ -139,7 +139,7 @@ public <T extends GeneratedMessageV3> Optional<T> invoke(String action, Class<T>
139139 * @return an Optional containing, or not, the response object to the Action call
140140 * @since 0.0.1
141141 */
142- public <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > Optional <T > invoke (String action , S value , Class <T > outputType ) throws ActorInvocationException {
142+ public <T extends GeneratedMessage , S extends GeneratedMessage > Optional <T > invoke (String action , S value , Class <T > outputType ) throws ActorInvocationException {
143143 Optional <T > res = invokeActor (action , value , outputType , Optional .empty ());
144144 return res .map (outputType ::cast );
145145
@@ -158,7 +158,7 @@ public <T extends GeneratedMessageV3, S extends GeneratedMessageV3> Optional<T>
158158 * @return an Optional containing, or not, the response object to the Action call
159159 * @since 0.0.1
160160 */
161- public <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > Optional <T > invoke (String action , S value , Class <T > outputType , InvocationOpts opts ) throws ActorInvocationException {
161+ public <T extends GeneratedMessage , S extends GeneratedMessage > Optional <T > invoke (String action , S value , Class <T > outputType , InvocationOpts opts ) throws ActorInvocationException {
162162 Optional <T > res = invokeActor (action , value , outputType , Optional .ofNullable (opts ));
163163 return res .map (outputType ::cast );
164164
@@ -172,7 +172,7 @@ public <T extends GeneratedMessageV3, S extends GeneratedMessageV3> Optional<T>
172172 * @param action name of the action to be called.
173173 * @since 0.0.1
174174 */
175- public <T extends GeneratedMessageV3 > void invokeAsync (String action ) throws ActorInvocationException {
175+ public <T extends GeneratedMessage > void invokeAsync (String action ) throws ActorInvocationException {
176176 InvocationOpts opts = InvocationOpts .builder ().async (true ).build ();
177177 invokeActor (action , Empty .getDefaultInstance (), null , Optional .of (opts ));
178178 }
@@ -187,7 +187,7 @@ public <T extends GeneratedMessageV3> void invokeAsync(String action) throws Act
187187 * Please see the {@link io.eigr.spawn.api.InvocationOpts} class for more information
188188 * @since 0.0.1
189189 */
190- public <T extends GeneratedMessageV3 > void invokeAsync (String action , InvocationOpts opts ) throws ActorInvocationException {
190+ public <T extends GeneratedMessage > void invokeAsync (String action , InvocationOpts opts ) throws ActorInvocationException {
191191 InvocationOpts mergedOpts = InvocationOpts .builder ()
192192 .async (true )
193193 .delaySeconds (opts .getDelaySeconds ())
@@ -207,7 +207,7 @@ public <T extends GeneratedMessageV3> void invokeAsync(String action, Invocation
207207 * @param value the action argument object.
208208 * @since 0.0.1
209209 */
210- public <T extends GeneratedMessageV3 > void invokeAsync (String action , T value ) throws ActorInvocationException {
210+ public <T extends GeneratedMessage > void invokeAsync (String action , T value ) throws ActorInvocationException {
211211 InvocationOpts opts = InvocationOpts .builder ().async (true ).build ();
212212 invokeActorAsync (action , value , Optional .of (opts ));
213213 }
@@ -223,7 +223,7 @@ public <T extends GeneratedMessageV3> void invokeAsync(String action, T value) t
223223 * Please see the {@link io.eigr.spawn.api.InvocationOpts} class for more information
224224 * @since 0.0.1
225225 */
226- public <T extends GeneratedMessageV3 > void invokeAsync (String action , T value , InvocationOpts opts ) throws ActorInvocationException {
226+ public <T extends GeneratedMessage > void invokeAsync (String action , T value , InvocationOpts opts ) throws ActorInvocationException {
227227 InvocationOpts mergedOpts = InvocationOpts .builder ()
228228 .async (true )
229229 .delaySeconds (opts .getDelaySeconds ())
@@ -258,7 +258,7 @@ public boolean isUnNamedActor() {
258258 return false ;
259259 }
260260
261- private <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > Optional <T > invokeActor (
261+ private <T extends GeneratedMessage , S extends GeneratedMessage > Optional <T > invokeActor (
262262 String cmd , S argument , Class <T > outputType , Optional <InvocationOpts > options ) throws ActorInvocationException {
263263 Objects .requireNonNull (this .actorId , "ActorId cannot be null" );
264264
@@ -318,7 +318,7 @@ private <T extends GeneratedMessageV3, S extends GeneratedMessageV3> Optional<T>
318318 return Optional .empty ();
319319 }
320320
321- private <T extends GeneratedMessageV3 , S extends GeneratedMessageV3 > void invokeActorAsync (
321+ private <T extends GeneratedMessage , S extends GeneratedMessage > void invokeActorAsync (
322322 String cmd , S argument , Optional <InvocationOpts > options ) {
323323 Objects .requireNonNull (this .actorId , "ActorId cannot be null" );
324324
0 commit comments