[ 
https://issues.apache.org/jira/browse/IGNITE-6743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289379#comment-16289379
 ] 

Evgenii Zhuravlev commented on IGNITE-6743:
-------------------------------------------

[~andrey-kuznetsov]

Java 9 doesn't have class "sun.misc.Cleaner", so this fix won't work. In java 9 
this class placed in package "jdk.internal.ref", so, if we will decide to use 
reflection here for both java 8&9 we will need to use different class names. 

At the same time, in java 9 were added Unsafe.invokeCleaner, which do what we 
need without any reflection. If we will decide to create some different Util 
class for java 9, I would suggest using this methond, since it will show better 
performance.

So, I would suggest waiting for other fixes related to java 9 support, if we 
will introduce new different Util classes for java 8 & java 9(in different 
modules) then it's better to use the method I've suggested.

What do you think here, guys?

> Java 9: rework DirectBuffer.cleaner().clean() usage in GridNioServer
> --------------------------------------------------------------------
>
>                 Key: IGNITE-6743
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6743
>             Project: Ignite
>          Issue Type: Task
>          Components: general
>            Reporter: Vladimir Ozerov
>            Assignee: Andrey Kuznetsov
>             Fix For: 2.4
>
>
> When session is closed we clean allocated {{DirectByteBuffer}}-s using 
> {{sun.misc.Cleaner}}. Need to rework this piece to reflection-based approach 
> which will work for supported Java versions.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to