You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Evgenii Zhuravlev (JIRA)" <ji...@apache.org> on 2017/12/13 15:46:02 UTC
[jira] [Comment Edited] (IGNITE-6743) Java 9: rework
DirectBuffer.cleaner().clean() usage in GridNioServer
[ https://issues.apache.org/jira/browse/IGNITE-6743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289379#comment-16289379 ]
Evgenii Zhuravlev edited comment on IGNITE-6743 at 12/13/17 3:46 PM:
---------------------------------------------------------------------
[~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".
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 method, since it will show better performance.
Or, we can just use reflection to invoke this method from Unsafe in java 9
was (Author: ezhuravl):
[~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)