-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support spring-boot-devtoools reloadable classlaoder
- Loading branch information
Showing
10 changed files
with
237 additions
and
28 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
.../src/main/java/datadog/trace/bootstrap/instrumentation/classloading/MemoizerResetter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package datadog.trace.bootstrap.instrumentation.classloading; | ||
|
||
@FunctionalInterface | ||
public interface MemoizerResetter { | ||
void reset(); | ||
|
||
abstract class Supplier { | ||
private static volatile MemoizerResetter SUPPLIER; | ||
|
||
public static void reset() { | ||
if (SUPPLIER != null) { | ||
SUPPLIER.reset(); | ||
} | ||
} | ||
|
||
public static synchronized void registerIfAbsent(MemoizerResetter supplier) { | ||
if (SUPPLIER == null) { | ||
SUPPLIER = supplier; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.