/** * Unlocks this workspace info. This is used (and only should be) by * the {@link XASessionImpl} in order to lock all internal resources * during a commit. */ void lockRelease() { xaLock.release(); }
/** * @jmx:managed-operation * */ public Object resolveMetaData(Object key) { return metadata.get(key); }
public AlarmFacilityImpl(AlarmMBeanImpl aMBean) { mBean = aMBean; /* We use a ConcurrentReaderHashMap to ensure thread safety but to avoid * synchronizong all methods. Reads outnumber writes. */ registeredComps = new ConcurrentReaderHashMap(); /* We also use a ConcurrentReaderHashMap on the notification types. * The concurrency library does not have ConcurrentReaderHashSet so we * can just use the map instead and insert same reference in key and value. */ notificationTypes = new ConcurrentReaderHashMap(); }
protected void createService() throws Exception { if( this.isStrict == Boolean.TRUE ) this.strictMaxSize = new FIFOSemaphore(this.maxSize); }
/** Get the passivated count. * @jmx:managed-attribute * @return the number of passivated instances. */ public long getPassivatedCount() { return passivatedIDs.size(); }
/** * Gets the next run timestamp * * @return the next run */ public long getNextRun() { return nextRun.get(); }
public LoaderThread(Source source, XMLByteStreamCompiler serializer) { this.source = source; this.serializer = serializer; this.finished = new CountDown( 1 ); }
public int getNumberOfAvailableConnections() { if (semaphore == null) return 0; return (int) semaphore.permits(); }
/** * @see EDU.oswego.cs.dl.util.concurrent.Takable#take() */ public Object take() throws InterruptedException { return channel.take(); } }
/** * return the number of mbeans being tracked * * @return */ public final int count() { return count.get(); }
/** * @see EDU.oswego.cs.dl.util.concurrent.Puttable#put(java.lang.Object) */ public void put( final Object obj ) throws InterruptedException { channel.put( obj ); }
/** * Clean up deamon threads, if necessary. */ public void finalize() { if (this.taskGroup!=null) this.taskGroup.interruptAll(); } protected void run(final DoubleMatrix2D[] blocksA, final DoubleMatrix2D[] blocksB, final double[] results, final Matrix2DMatrix2DFunction function) {
void join() { try { this.finished.acquire(); } catch ( final InterruptedException ie) { // ignore } } }
/** * Unlocks this workspace info. This is used (and only should be) by * the {@link XASessionImpl} in order to lock all internal resources * during a commit. */ void lockRelease() { xaLock.release(); }
protected final void unlock() throws InterruptedException { m_mutex.release(); }