55
55
* @author Marius Bogoevici
56
56
* @author Gary Russell
57
57
* @author Biju Kunjummen
58
+ * @author Giacomo Baso
58
59
*/
59
60
public interface KafkaOperations <K , V > {
60
61
@@ -68,15 +69,15 @@ public interface KafkaOperations<K, V> {
68
69
* @param data The data.
69
70
* @return a Future for the {@link SendResult}.
70
71
*/
71
- CompletableFuture <SendResult <K , V >> sendDefault (V data );
72
+ CompletableFuture <SendResult <K , V >> sendDefault (@ Nullable V data );
72
73
73
74
/**
74
75
* Send the data to the default topic with the provided key and no partition.
75
76
* @param key the key.
76
77
* @param data The data.
77
78
* @return a Future for the {@link SendResult}.
78
79
*/
79
- CompletableFuture <SendResult <K , V >> sendDefault (K key , V data );
80
+ CompletableFuture <SendResult <K , V >> sendDefault (K key , @ Nullable V data );
80
81
81
82
/**
82
83
* Send the data to the default topic with the provided key and partition.
@@ -85,7 +86,7 @@ public interface KafkaOperations<K, V> {
85
86
* @param data the data.
86
87
* @return a Future for the {@link SendResult}.
87
88
*/
88
- CompletableFuture <SendResult <K , V >> sendDefault (Integer partition , K key , V data );
89
+ CompletableFuture <SendResult <K , V >> sendDefault (Integer partition , K key , @ Nullable V data );
89
90
90
91
/**
91
92
* Send the data to the default topic with the provided key and partition.
@@ -96,15 +97,15 @@ public interface KafkaOperations<K, V> {
96
97
* @return a Future for the {@link SendResult}.
97
98
* @since 1.3
98
99
*/
99
- CompletableFuture <SendResult <K , V >> sendDefault (Integer partition , Long timestamp , K key , V data );
100
+ CompletableFuture <SendResult <K , V >> sendDefault (Integer partition , Long timestamp , K key , @ Nullable V data );
100
101
101
102
/**
102
103
* Send the data to the provided topic with no key or partition.
103
104
* @param topic the topic.
104
105
* @param data The data.
105
106
* @return a Future for the {@link SendResult}.
106
107
*/
107
- CompletableFuture <SendResult <K , V >> send (String topic , V data );
108
+ CompletableFuture <SendResult <K , V >> send (String topic , @ Nullable V data );
108
109
109
110
/**
110
111
* Send the data to the provided topic with the provided key and no partition.
@@ -113,7 +114,7 @@ public interface KafkaOperations<K, V> {
113
114
* @param data The data.
114
115
* @return a Future for the {@link SendResult}.
115
116
*/
116
- CompletableFuture <SendResult <K , V >> send (String topic , K key , V data );
117
+ CompletableFuture <SendResult <K , V >> send (String topic , K key , @ Nullable V data );
117
118
118
119
/**
119
120
* Send the data to the provided topic with the provided key and partition.
@@ -123,7 +124,7 @@ public interface KafkaOperations<K, V> {
123
124
* @param data the data.
124
125
* @return a Future for the {@link SendResult}.
125
126
*/
126
- CompletableFuture <SendResult <K , V >> send (String topic , Integer partition , K key , V data );
127
+ CompletableFuture <SendResult <K , V >> send (String topic , Integer partition , K key , @ Nullable V data );
127
128
128
129
/**
129
130
* Send the data to the provided topic with the provided key and partition.
@@ -135,7 +136,7 @@ public interface KafkaOperations<K, V> {
135
136
* @return a Future for the {@link SendResult}.
136
137
* @since 1.3
137
138
*/
138
- CompletableFuture <SendResult <K , V >> send (String topic , Integer partition , Long timestamp , K key , V data );
139
+ CompletableFuture <SendResult <K , V >> send (String topic , Integer partition , Long timestamp , K key , @ Nullable V data );
139
140
140
141
/**
141
142
* Send the provided {@link ProducerRecord}.
0 commit comments