Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 jdk.jfr.jmod - JFR Module
JDK 11 jdk.jfr.jmod is the JMOD file for JDK 11 JFR module.
JDK 11 JFR module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jfr.jmod.
JDK 11 JFR module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 JFR module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jfr.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/jfr/consumer/ConstantMap.java
/* * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.jfr.consumer; import java.util.ArrayList; import java.util.List; /** * Holds mapping between a set of keys and their corresponding object. * * If the type is a known type, i.e. {@link RecordedThread}, an * {@link ObjectFactory} can be supplied which will instantiate a typed object. */ final class ConstantMap { private final static class Reference { private final long key; private final ConstantMap pool; Reference(ConstantMap pool, long key) { this.pool = pool; this.key = key; } Object resolve() { return pool.get(key); } } private final ObjectFactory<?> factory; private final LongMap<Object> objects; private LongMap<Boolean> isResolving; private boolean allResolved; private String name; ConstantMap(ObjectFactory<?> factory, String name) { this.name = name; this.objects = new LongMap<>(); this.factory = factory; } Object get(long id) { // fast path, all objects in pool resolved if (allResolved) { return objects.get(id); } // referenced from a pool, deal with this later if (isResolving == null) { return new Reference(this, id); } Boolean beingResolved = isResolving.get(id); // we are resolved (but not the whole pool) if (Boolean.FALSE.equals(beingResolved)) { return objects.get(id); } // resolving ourself, abort to avoid infinite recursion if (Boolean.TRUE.equals(beingResolved)) { return null; } // resolve me! isResolving.put(id, Boolean.TRUE); Object resolved = resolve(objects.get(id)); isResolving.put(id, Boolean.FALSE); if (factory != null) { Object factorized = factory.createObject(id, resolved); objects.put(id, factorized); return factorized; } else { objects.put(id, resolved); return resolved; } } private static Object resolve(Object o) { if (o instanceof Reference) { return resolve(((Reference) o).resolve()); } if (o != null && o.getClass().isArray()) { final Object[] array = (Object[]) o; for (int i = 0; i < array.length; i++) { array[i] = resolve(array[i]); } return array; } return o; } public void resolve() { List<Long> keyList = new ArrayList<>(); objects.keys().forEachRemaining(keyList::add); for (Long l : keyList) { get(l); } } public void put(long key, Object value) { objects.put(key, value); } public void setIsResolving() { isResolving = new LongMap<>(); } public void setResolved() { allResolved = true; isResolving = null; // pool finished, release memory } public String getName() { return name; } }
⏎ jdk/jfr/consumer/ConstantMap.java
Or download all of them as a single archive file:
File name: jdk.jfr-11.0.1-src.zip File size: 237632 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jlink.jmod - JLink Tool
2020-06-30, 37445👍, 0💬
Popular Posts:
ZooKeeper is a centralized service for maintaining configuration information, naming, providing dist...
What Is commons-net-ftp-2.0.jar? commons-net-ftp-2.0.jar is the JAR file for Apache Commons Net FTP ...
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module. JDK 11 Naming module compiled cla...
MXP1 is a stable XmlPull parsing engine that is based on ideas from XPP and in particular XPP2 but c...
Jetty provides an HTTP server, HTTP client, and javax.servlet container. These components are open s...