tillrohrmann commented on a change in pull request #11109: 
[FLINK-15758][MemManager] Release segment and its unsafe memory in GC Cleaner
URL: https://github.com/apache/flink/pull/11109#discussion_r410252956
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/util/JavaGcCleanerWrapper.java
 ##########
 @@ -218,6 +278,22 @@ private static Method getCleanMethod(Class<?> 
cleanableClass) {
                        }
                }
 
+               private static Method 
getSharedSecretsGetJavaLangRefAccessMethod(Class<?> sharedSecretsClass) {
+                       try {
+                               return 
sharedSecretsClass.getMethod("getJavaLangRefAccess");
+                       } catch (NoSuchMethodException e) {
+                               throw new FlinkRuntimeException("Failed to find 
Java 9 SharedSecrets#getJavaLangRefAccess method", e);
+                       }
+               }
+
+               private static Method 
getJavaLangRefAccessWaitForReferenceProcessing(Class<?> javaLangRefAccessClass) 
{
+                       try {
+                               return 
javaLangRefAccessClass.getMethod("waitForReferenceProcessing");
+                       } catch (NoSuchMethodException e) {
+                               throw new FlinkRuntimeException("Failed to find 
Java 9 JavaLangRefAccess#waitForReferenceProcessing method", e);
+                       }
+               }
 
 Review comment:
   Same here with the deduplication. Maybe it's even across the different 
`CleanerProvider` implementations possible.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to