27
27
*
28
28
* @author <a href="https://github.com/aschrijver/">Arnold Schrijver</a>
29
29
*/
30
- public class DataLoaderOptions < K , V > {
30
+ public class DataLoaderOptions {
31
31
32
32
private boolean batchingEnabled ;
33
33
private boolean cachingEnabled ;
34
34
private CacheKey cacheKeyFunction ;
35
- private CacheMap < K , Future < V >> cacheMap ;
35
+ private CacheMap cacheMap ;
36
36
37
37
/**
38
38
* Creates a new data loader options with default settings.
@@ -42,16 +42,16 @@ public DataLoaderOptions() {
42
42
cachingEnabled = true ;
43
43
}
44
44
45
- public static < K , V > DataLoaderOptions < K , V > create () {
46
- return new DataLoaderOptions <> ();
45
+ public static DataLoaderOptions create () {
46
+ return new DataLoaderOptions ();
47
47
}
48
48
49
49
/**
50
50
* Clones the provided data loader options.
51
51
*
52
52
* @param other the other options instance
53
53
*/
54
- public DataLoaderOptions (DataLoaderOptions < K , V > other ) {
54
+ public DataLoaderOptions (DataLoaderOptions other ) {
55
55
Objects .requireNonNull (other , "Other data loader options cannot be null" );
56
56
this .batchingEnabled = other .batchingEnabled ;
57
57
this .cachingEnabled = other .cachingEnabled ;
@@ -90,7 +90,7 @@ public boolean batchingEnabled() {
90
90
* @param batchingEnabled {@code true} to enable batch loading, {@code false} otherwise
91
91
* @return the data loader options for fluent coding
92
92
*/
93
- public DataLoaderOptions < K , V > setBatchingEnabled (boolean batchingEnabled ) {
93
+ public DataLoaderOptions setBatchingEnabled (boolean batchingEnabled ) {
94
94
this .batchingEnabled = batchingEnabled ;
95
95
return this ;
96
96
}
@@ -110,7 +110,7 @@ public boolean cachingEnabled() {
110
110
* @param cachingEnabled {@code true} to enable caching, {@code false} otherwise
111
111
* @return the data loader options for fluent coding
112
112
*/
113
- public DataLoaderOptions < K , V > setCachingEnabled (boolean cachingEnabled ) {
113
+ public DataLoaderOptions setCachingEnabled (boolean cachingEnabled ) {
114
114
this .cachingEnabled = cachingEnabled ;
115
115
return this ;
116
116
}
@@ -132,7 +132,7 @@ public Optional<CacheKey> cacheKeyFunction() {
132
132
* @param cacheKeyFunction the cache key function to use
133
133
* @return the data loader options for fluent coding
134
134
*/
135
- public DataLoaderOptions < K , V > setCacheKeyFunction (CacheKey cacheKeyFunction ) {
135
+ public DataLoaderOptions setCacheKeyFunction (CacheKey cacheKeyFunction ) {
136
136
this .cacheKeyFunction = cacheKeyFunction ;
137
137
return this ;
138
138
}
@@ -144,7 +144,7 @@ public DataLoaderOptions<K, V> setCacheKeyFunction(CacheKey cacheKeyFunction) {
144
144
*
145
145
* @return an optional with the cache map instance, or empty
146
146
*/
147
- public Optional <CacheMap < K , Future < V >> > cacheMap () {
147
+ public Optional <CacheMap > cacheMap () {
148
148
return Optional .ofNullable (cacheMap );
149
149
}
150
150
@@ -154,7 +154,7 @@ public Optional<CacheMap<K, Future<V>>> cacheMap() {
154
154
* @param cacheMap the cache map instance
155
155
* @return the data loader options for fluent coding
156
156
*/
157
- public DataLoaderOptions setCacheMap (CacheMap <K , Future <V >> cacheMap ) {
157
+ public < K , V > DataLoaderOptions setCacheMap (CacheMap <K , Future <V >> cacheMap ) {
158
158
this .cacheMap = cacheMap ;
159
159
return this ;
160
160
}
0 commit comments