[infinispan-issues] [JBoss JIRA] (ISPN-2851) add log.info when using backported concurrent hash map

Mathieu Lachance (JIRA) jira-events at lists.jboss.org
Mon Feb 25 09:19:56 EST 2013


Mathieu Lachance created ISPN-2851:
--------------------------------------

             Summary: add log.info when using backported concurrent hash map
                 Key: ISPN-2851
                 URL: https://issues.jboss.org/browse/ISPN-2851
             Project: Infinispan
          Issue Type: Enhancement
          Components: Core API
    Affects Versions: 5.2.2.Final
            Reporter: Mathieu Lachance
            Assignee: Mircea Markus


it would be nice if there was a bit more logging information when using backported concurrent hash map since it is activation is not only based on the :
Boolean.getBoolean("infinispan.unsafe.allow_jdk8_chm");
property as we could think.

   static {
      boolean sunIncompatibleJvm;
      boolean jdk8;
      boolean allowExperimentalMap = Boolean.getBoolean("infinispan.unsafe.allow_jdk8_chm");

      try {
         Class.forName("com.sun.unsafe.Unsafe");
         sunIncompatibleJvm = false;
      } catch (ClassNotFoundException e) {
         sunIncompatibleJvm = true;
      }
      
      try {
         Class.forName("java.util.concurrent.atomic.LongAdder");
         jdk8 = true;
      } catch (ClassNotFoundException e) {
         jdk8 = false;
      }

      if (jdk8 || sunIncompatibleJvm || !allowExperimentalMap){
         MAP_CREATOR = new JdkConcurrentMapCreator();
      }
      else{
         MAP_CREATOR = new BackportedV8ConcurrentMapCreator();
         logger.info("using backported jdk8 concurrent hash map implementation");
      }
   }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list