File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed
src/main/java/com/uid2/shared/vertx Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,10 @@ public void start(Promise<Void> startPromise) throws Exception {
83
83
private void startRefresh (Promise <Void > promise ) {
84
84
LOGGER .info ("Starting " + this .storeName + " loading" );
85
85
final long startupRefreshStart = System .nanoTime ();
86
- vertx .executeBlocking (p -> {
87
- try {
88
- this .refresh ();
89
- p .complete ();
90
- } catch (Exception e ) {
91
- p .fail (e );
92
- }
93
- }, ar -> {
86
+ vertx .executeBlocking (() -> {
87
+ this .refresh ();
88
+ return null ;
89
+ }).onComplete (ar -> {
94
90
final long startupRefreshEnd = System .nanoTime ();
95
91
final long startupRefreshTimeMs = (startupRefreshEnd - startupRefreshStart ) / 1000000 ;
96
92
@@ -112,15 +108,10 @@ private void startBackgroundRefresh() {
112
108
vertx .setPeriodic (this .refreshIntervalMs , (id ) -> {
113
109
final long start = System .nanoTime ();
114
110
115
- vertx .executeBlocking (promise -> {
116
- try {
117
- this .refresh ();
118
- promise .complete ();
119
- } catch (Exception e ) {
120
- promise .fail (e );
121
- }
122
- },
123
- asyncResult -> {
111
+ vertx .executeBlocking (() -> {
112
+ this .refresh ();
113
+ return null ;
114
+ }).onComplete (asyncResult -> {
124
115
final long end = System .nanoTime ();
125
116
final long elapsed = ((end - start ) / 1000000 );
126
117
this .counterStoreRefreshTimeMs .increment (elapsed );
You can’t perform that action at this time.
0 commit comments