public int getNumJobsCurrentlyExecuting () { synchronized (executingJobs) { return executingJobs.size (); } }
/** * <p> * Get the number of <code>{@link com.helger.quartz.ICalendar}</code> s that are * stored in the <code>JobsStore</code>. * </p> */ public int getNumberOfCalendars () { synchronized (m_aLock) { return m_aCalendarsByName.size (); } }
/** * <p> * Get the number of <code>{@link com.helger.quartz.IJobDetail}</code> s that * are stored in the <code>JobsStore</code>. * </p> */ public int getNumberOfJobs () { synchronized (m_aLock) { return m_aJobsByKey.size (); } }
@Nonnegative public int getNamespaceCount () { return (m_sDefaultNamespaceURI == null ? 0 : 1) + (m_aURL2PrefixMap == null ? 0 : m_aURL2PrefixMap.size ()); }
/** * @return The number of contained variables. Always ≥ 0. */ @Nonnegative public int getVariableCount () { return m_aMap.size (); }
@Nonnegative public final int getItemCount () { return m_aItemStore.size (); }
@Nonnegative public final int getChildCount () { return m_aChildMap == null ? 0 : m_aChildMap.size (); }
/** * @return The number of contained variables. Always ≥ 0. */ @Nonnegative public int getVariableCount () { return m_aMap.size (); }
@Nonnegative public final int getProfileCount () { return m_aRWLock.readLocked ( () -> m_aMap.size ()); }
@Nonnegative public int getRunningJobCount () { return m_aRWLock.readLocked ( () -> m_aRunningJobs.size ()); }
@Nonnegative public int getItemCount () { return m_aRWLock.readLocked ( () -> m_aMap.size ()); }
/** * @return The number of uploaded files. Always ≥ 0. */ @Nonnegative public int getUploadedFileCount () { return m_aRWLock.readLocked ( () -> m_aMap.size ()); }
@Nonnegative public int size () { return m_aRWLock.readLocked ( () -> m_aMap.size ()); }
@SuppressWarnings ("unchecked") private void readObject (@Nonnull final ObjectInputStream in) throws IOException, ClassNotFoundException { if (m_aSessionWebScope != null) throw new IllegalStateException ("Another SessionWebScope is already present: " + m_aSessionWebScope.toString ()); // Read session attributes m_aAttrs = (ICommonsMap <String, Object>) in.readObject (); if (ScopeHelper.debugSessionScopeLifeCycle (LOGGER)) if (LOGGER.isInfoEnabled ()) LOGGER.info ("Read info on session scope: " + m_aAttrs.size () + " attrs of class " + ClassHelper.getClassLocalName (this), ScopeHelper.getDebugStackTrace ()); }
/** * Remove all registered backends and re-read the information from the SPI * providers. */ public void reinitialize () { m_aRWLock.writeLocked ( () -> { m_aMap.clear (); // register all SPI implementations for (final ISMPBackendRegistrarSPI aSPI : ServiceLoaderHelper.getAllSPIImplementations (ISMPBackendRegistrarSPI.class)) { if (LOGGER.isDebugEnabled ()) LOGGER.debug ("Calling registerSMPBackend on " + aSPI.getClass ().getName ()); aSPI.registerSMPBackend (this); } if (LOGGER.isDebugEnabled ()) LOGGER.debug (m_aMap.size () + " SMP backends registered"); }); }
private void _checkIfAnySessionsExist () { if (containsAnySession ()) { m_aRWLock.writeLocked ( () -> { LOGGER.error ("The following " + m_aSessionScopes.size () + " session scopes are left over: " + m_aSessionScopes.toString ()); m_aSessionScopes.clear (); }); } }
public void reload () throws DAOException { m_aRWLock.writeLockedThrowing ( () -> { m_aMap.clear (); initialRead (); }); LOGGER.info ("Reloaded " + m_aMap.size () + " go-mappings!"); }
/** * Remove all registered backends and re-read the information from the SPI * providers. */ public void reinitialize () { m_aRWLock.writeLocked ( () -> { m_aMap.clear (); // register all SPI implementations for (final ISMPBackendRegistrarSPI aSPI : ServiceLoaderHelper.getAllSPIImplementations (ISMPBackendRegistrarSPI.class)) { if (LOGGER.isDebugEnabled ()) LOGGER.debug ("Calling registerSMPBackend on " + aSPI.getClass ().getName ()); aSPI.registerSMPBackend (this); } if (LOGGER.isDebugEnabled ()) LOGGER.debug (m_aMap.size () + " SMP backends registered"); }); }
@Nullable public EMomentsDateTimePickerFormatToken getNextToken () { m_aAllMatching.clear (); for (final EMomentsDateTimePickerFormatToken eToken : EMomentsDateTimePickerFormatToken.values ()) { final String sJavaToken = eToken.getJavaToken (); if (m_sRest.startsWith (sJavaToken)) m_aAllMatching.put (sJavaToken, eToken); } if (m_aAllMatching.isEmpty ()) return null; Map.Entry <String, EMomentsDateTimePickerFormatToken> aEntry; if (m_aAllMatching.size () == 1) aEntry = m_aAllMatching.getFirstEntry (); else aEntry = m_aAllMatching.getSortedByKey (m_aComp).getFirstEntry (); m_sRest = m_sRest.substring (aEntry.getKey ().length ()); return aEntry.getValue (); }
@Nullable public EDateTimePickerFormatToken getNextToken () { m_aAllMatching.clear (); for (final EDateTimePickerFormatToken eToken : EDateTimePickerFormatToken.values ()) { final String sJavaToken = eToken.getJavaToken (); if (m_sRest.startsWith (sJavaToken)) m_aAllMatching.put (sJavaToken, eToken); } if (m_aAllMatching.isEmpty ()) return null; Map.Entry <String, EDateTimePickerFormatToken> aEntry; if (m_aAllMatching.size () == 1) aEntry = m_aAllMatching.getFirstEntry (); else aEntry = m_aAllMatching.getSortedByKey (m_aComp).getFirstEntry (); m_sRest = m_sRest.substring (aEntry.getKey ().length ()); return aEntry.getValue (); }