8
8
// the Business Source License, use of this software will be governed
9
9
// by the Apache License, Version 2.0.
10
10
11
- use super :: Effect ;
12
- use super :: JournalMetadata ;
11
+ use std:: ops:: RangeInclusive ;
12
+
13
+ use tokio:: sync:: mpsc;
13
14
14
- use crate :: invocation_reader:: JournalEntry ;
15
15
use restate_errors:: NotRunningError ;
16
16
use restate_types:: identifiers:: PartitionKey ;
17
17
use restate_types:: identifiers:: { InvocationId , PartitionLeaderEpoch } ;
18
18
use restate_types:: invocation:: { InvocationEpoch , InvocationTarget } ;
19
19
use restate_types:: journal:: Completion ;
20
20
use restate_types:: journal_v2:: CommandIndex ;
21
21
use restate_types:: journal_v2:: raw:: RawNotification ;
22
- use std:: future:: Future ;
23
- use std:: ops:: RangeInclusive ;
24
- use tokio:: sync:: mpsc;
22
+
23
+ use super :: Effect ;
24
+ use super :: JournalMetadata ;
25
+ use crate :: invocation_reader:: JournalEntry ;
25
26
26
27
#[ derive( Debug , Eq , PartialEq , Default ) ]
27
28
pub enum InvokeInputJournal {
@@ -38,56 +39,56 @@ pub trait InvokerHandle<SR> {
38
39
invocation_epoch : InvocationEpoch ,
39
40
invocation_target : InvocationTarget ,
40
41
journal : InvokeInputJournal ,
41
- ) -> impl Future < Output = Result < ( ) , NotRunningError > > + Send ;
42
+ ) -> Result < ( ) , NotRunningError > ;
42
43
43
44
fn notify_completion (
44
45
& mut self ,
45
46
partition : PartitionLeaderEpoch ,
46
47
invocation_id : InvocationId ,
47
48
completion : Completion ,
48
- ) -> impl Future < Output = Result < ( ) , NotRunningError > > + Send ;
49
+ ) -> Result < ( ) , NotRunningError > ;
49
50
50
51
fn notify_notification (
51
52
& mut self ,
52
53
partition : PartitionLeaderEpoch ,
53
54
invocation_id : InvocationId ,
54
55
invocation_epoch : InvocationEpoch ,
55
56
entry : RawNotification ,
56
- ) -> impl Future < Output = Result < ( ) , NotRunningError > > + Send ;
57
+ ) -> Result < ( ) , NotRunningError > ;
57
58
58
59
fn retry_invocation_now (
59
60
& mut self ,
60
61
partition : PartitionLeaderEpoch ,
61
62
invocation_id : InvocationId ,
62
63
invocation_epoch : InvocationEpoch ,
63
- ) -> impl Future < Output = Result < ( ) , NotRunningError > > + Send ;
64
+ ) -> Result < ( ) , NotRunningError > ;
64
65
65
66
fn notify_stored_command_ack (
66
67
& mut self ,
67
68
partition : PartitionLeaderEpoch ,
68
69
invocation_id : InvocationId ,
69
70
invocation_epoch : InvocationEpoch ,
70
71
command_index : CommandIndex ,
71
- ) -> impl Future < Output = Result < ( ) , NotRunningError > > + Send ;
72
+ ) -> Result < ( ) , NotRunningError > ;
72
73
73
74
fn abort_all_partition (
74
75
& mut self ,
75
76
partition : PartitionLeaderEpoch ,
76
- ) -> impl Future < Output = Result < ( ) , NotRunningError > > + Send ;
77
+ ) -> Result < ( ) , NotRunningError > ;
77
78
78
79
/// *Note*: When aborting an invocation, and restarting it, the `invocation_epoch` MUST be bumped.
79
80
fn abort_invocation (
80
81
& mut self ,
81
82
partition_leader_epoch : PartitionLeaderEpoch ,
82
83
invocation_id : InvocationId ,
83
84
invocation_epoch : InvocationEpoch ,
84
- ) -> impl Future < Output = Result < ( ) , NotRunningError > > + Send ;
85
+ ) -> Result < ( ) , NotRunningError > ;
85
86
86
87
fn register_partition (
87
88
& mut self ,
88
89
partition : PartitionLeaderEpoch ,
89
90
partition_key_range : RangeInclusive < PartitionKey > ,
90
91
storage_reader : SR ,
91
92
sender : mpsc:: Sender < Box < Effect > > ,
92
- ) -> impl Future < Output = Result < ( ) , NotRunningError > > + Send ;
93
+ ) -> Result < ( ) , NotRunningError > ;
93
94
}
0 commit comments