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:
JRE 8 rt.jar - com.* Package Source Code
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime environment included in JDK 8. JRE 8 rt.jar libraries are divided into 6 packages:
com.* - Internal Oracle and Sun Microsystems libraries java.* - Standard Java API libraries. javax.* - Extended Java API libraries. jdk.* - JDK supporting libraries. org.* - Third party libraries. sun.* - Old libraries developed by Sun Microsystems.
JAR File Information:
Directory of C:\fyicenter\jdk-1.8.0_191\jre\lib 63,596,151 rt.jar
Here is the list of Java classes of the com.* package in JRE 1.8.0_191 rt.jar. Java source codes are also provided.
✍: FYIcenter
⏎ com/sun/corba/se/impl/orbutil/threadpool/WorkQueueImpl.java
/* * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.corba.se.impl.orbutil.threadpool; import java.util.LinkedList; import com.sun.corba.se.spi.orbutil.threadpool.ThreadPool; import com.sun.corba.se.spi.orbutil.threadpool.Work; import com.sun.corba.se.spi.orbutil.threadpool.WorkQueue; import com.sun.corba.se.impl.orbutil.ORBConstants; import com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl; import com.sun.corba.se.spi.monitoring.MonitoringConstants; import com.sun.corba.se.spi.monitoring.MonitoringFactories; import com.sun.corba.se.spi.monitoring.MonitoredObject; import com.sun.corba.se.spi.monitoring.LongMonitoredAttributeBase; public class WorkQueueImpl implements WorkQueue { private ThreadPool workerThreadPool; private LinkedList theWorkQueue = new LinkedList(); private long workItemsAdded = 0; // Initialized to 1 to avoid divide by zero in averageTimeInQueue() private long workItemsDequeued = 1; private long totalTimeInQueue = 0; // Name of the work queue private String name; // MonitoredObject for work queue private MonitoredObject workqueueMonitoredObject; public WorkQueueImpl() { name=ORBConstants.WORKQUEUE_DEFAULT_NAME; initializeMonitoring(); } public WorkQueueImpl(ThreadPool workerThreadPool) { this(workerThreadPool, ORBConstants.WORKQUEUE_DEFAULT_NAME); } public WorkQueueImpl(ThreadPool workerThreadPool, String name) { this.workerThreadPool = workerThreadPool; this.name = name; initializeMonitoring(); } // Setup monitoring for this workqueue private void initializeMonitoring() { workqueueMonitoredObject = MonitoringFactories. getMonitoredObjectFactory(). createMonitoredObject(name, MonitoringConstants.WORKQUEUE_MONITORING_DESCRIPTION); LongMonitoredAttributeBase b1 = new LongMonitoredAttributeBase(MonitoringConstants.WORKQUEUE_TOTAL_WORK_ITEMS_ADDED, MonitoringConstants.WORKQUEUE_TOTAL_WORK_ITEMS_ADDED_DESCRIPTION) { public Object getValue() { return new Long(WorkQueueImpl.this.totalWorkItemsAdded()); } }; workqueueMonitoredObject.addAttribute(b1); LongMonitoredAttributeBase b2 = new LongMonitoredAttributeBase(MonitoringConstants.WORKQUEUE_WORK_ITEMS_IN_QUEUE, MonitoringConstants.WORKQUEUE_WORK_ITEMS_IN_QUEUE_DESCRIPTION) { public Object getValue() { return new Long(WorkQueueImpl.this.workItemsInQueue()); } }; workqueueMonitoredObject.addAttribute(b2); LongMonitoredAttributeBase b3 = new LongMonitoredAttributeBase(MonitoringConstants.WORKQUEUE_AVERAGE_TIME_IN_QUEUE, MonitoringConstants.WORKQUEUE_AVERAGE_TIME_IN_QUEUE_DESCRIPTION) { public Object getValue() { return new Long(WorkQueueImpl.this.averageTimeInQueue()); } }; workqueueMonitoredObject.addAttribute(b3); } // Package private method to get the monitored object for this // class MonitoredObject getMonitoredObject() { return workqueueMonitoredObject; } public synchronized void addWork(Work work) { workItemsAdded++; work.setEnqueueTime(System.currentTimeMillis()); theWorkQueue.addLast(work); ((ThreadPoolImpl)workerThreadPool).notifyForAvailableWork(this); } synchronized Work requestWork(long waitTime) throws TimeoutException, InterruptedException { Work workItem; ((ThreadPoolImpl)workerThreadPool).incrementNumberOfAvailableThreads(); if (theWorkQueue.size() != 0) { workItem = (Work)theWorkQueue.removeFirst(); totalTimeInQueue += System.currentTimeMillis() - workItem.getEnqueueTime(); workItemsDequeued++; ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads(); return workItem; } try { long remainingWaitTime = waitTime; long finishTime = System.currentTimeMillis() + waitTime; do { this.wait(remainingWaitTime); if (theWorkQueue.size() != 0) { workItem = (Work)theWorkQueue.removeFirst(); totalTimeInQueue += System.currentTimeMillis() - workItem.getEnqueueTime(); workItemsDequeued++; ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads(); return workItem; } remainingWaitTime = finishTime - System.currentTimeMillis(); } while (remainingWaitTime > 0); ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads(); throw new TimeoutException(); } catch (InterruptedException ie) { ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads(); throw ie; } } public void setThreadPool(ThreadPool workerThreadPool) { this.workerThreadPool = workerThreadPool; } public ThreadPool getThreadPool() { return workerThreadPool; } /** * Returns the total number of Work items added to the Queue. * This method is unsynchronized and only gives a snapshot of the * state when it is called */ public long totalWorkItemsAdded() { return workItemsAdded; } /** * Returns the total number of Work items in the Queue to be processed * This method is unsynchronized and only gives a snapshot of the * state when it is called */ public int workItemsInQueue() { return theWorkQueue.size(); } public synchronized long averageTimeInQueue() { return (totalTimeInQueue/workItemsDequeued); } public String getName() { return name; } } // End of file.
⏎ com/sun/corba/se/impl/orbutil/threadpool/WorkQueueImpl.java
Or download all of them as a single archive file:
File name: jre-rt-com-1.8.0_191-src.zip File size: 8099783 bytes Release date: 2018-10-28 Download
⇒ Backup JDK 8 Installation Directory
2023-02-07, 251749👍, 3💬
Popular Posts:
How to download and install JDK (Java Development Kit) 7? If you want to write Java applications, yo...
What Is poi-5.2.3.jar? poi-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...
What Is jaxb-api-2.1.6.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Java ...