@@ -849,18 +849,26 @@ public Map<String, String> getSimpleStates() {
849
849
* ordinal of AntiEntropyService.Status
850
850
*/
851
851
@ Override
852
- public void handleNotification (Notification notification , Object handback ) {
853
- Thread .currentThread ().setName (clusterName );
854
- // we're interested in "repair"
855
- String type = notification .getType ();
856
- LOG .debug ("Received notification: {} with type {}" , notification , type );
857
- if (("repair" ).equals (type )) {
858
- processOldApiNotification (notification );
859
- }
852
+ public void handleNotification (final Notification notification , Object handback ) {
853
+ // pass off the work immediately to a separate thread
854
+ EXECUTOR .submit (() -> {
855
+ String threadName = Thread .currentThread ().getName ();
856
+ try {
857
+ Thread .currentThread ().setName (clusterName );
858
+ // we're interested in "repair"
859
+ String type = notification .getType ();
860
+ LOG .debug ("Received notification: {} with type {}" , notification , type );
861
+ if (("repair" ).equals (type )) {
862
+ processOldApiNotification (notification );
863
+ }
860
864
861
- if (("progress" ).equals (type )) {
862
- processNewApiNotification (notification );
863
- }
865
+ if (("progress" ).equals (type )) {
866
+ processNewApiNotification (notification );
867
+ }
868
+ } finally {
869
+ Thread .currentThread ().setName (threadName );
870
+ }
871
+ });
864
872
}
865
873
866
874
/**
0 commit comments