[jboss-jira] [JBoss JIRA] (JGRP-2469) GossipRouter: make GraalVM-compliant

Bela Ban (Jira) issues at jboss.org
Fri Apr 17 06:14:00 EDT 2020


    [ https://issues.redhat.com/browse/JGRP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14040844#comment-14040844 ] 

Bela Ban commented on JGRP-2469:
--------------------------------

Added an {{init()}} method. Called by {{start()}} if user forgot to call it explictly.
The builder idea creates duplicate code (all attrs), so I rejected it.

> GossipRouter: make GraalVM-compliant
> ------------------------------------
>
>                 Key: JGRP-2469
>                 URL: https://issues.redhat.com/browse/JGRP-2469
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>            Priority: Major
>             Fix For: 5.0.0.Alpha5
>
>
> Currently, GossipRouter starts threads in the constructor. This prohibits it to run under GraalVM as a native image, as threads cannot be started at build time.
> Create a separate method {{init()}}, which is called after the constructor and after all attributes have been set, but before {{start()}}.
> Alternative: use a builder:
> {code:java}
> router=GossipRouter.builder().setXX().build(); // creates server
> router.start();
> {code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list