Skip to content

Commit

Permalink
Runtime initialize JGroups Util class
Browse files Browse the repository at this point in the history
  • Loading branch information
pruivo authored and wburns committed Feb 1, 2024
1 parent e83a0a9 commit 86c1d71
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package org.infinispan.quarkus.embedded.runtime.graal;

import java.net.InetAddress;
import java.net.NetworkInterface;
import java.security.SecureRandom;
import java.util.Collection;
import java.util.List;
import java.util.Random;

import org.jgroups.JChannel;
Expand Down Expand Up @@ -55,6 +59,17 @@ public void stop() {
@TargetClass(Util.class)
final class SubstituteJgroupsUtil {

@Alias
// Force it to null - so it can be reinitialized
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
protected static volatile List<NetworkInterface> CACHED_INTERFACES;

@Alias
// Force it to null - so it can be reinitialized
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
protected static volatile Collection<InetAddress> CACHED_ADDRESSES;


@Substitute
public static void registerChannel(JChannel channel, String name) {
// do nothing
Expand Down

0 comments on commit 86c1d71

Please sign in to comment.