/** returns the current time in YYYY-MM-DD HH:MM:SS.mss format */ public static String makeDateString() { return makeDateString(System.currentTimeMillis()); }
/** * Gets a usable MBeanServerConnection. * * Method is threadsafe. * * @returns the MBeanServerConnection * @throws IllegalStateException if not connected. */ private synchronized MBeanServerConnection getConnectionOrFail() { if (isConnected()) return getConnection(); if (triedConnecting) { throw new IllegalStateException("Failed to connect to JMX at "+url); } else { String msg = "Not connected (and not attempted to connect) to JMX at "+url+ (failedReconnecting ? (" (last reconnect failure at "+ Time.makeDateString(failedReconnectingTime) + ")") : ""); throw new IllegalStateException(msg); } }
(isUp != null ? isUp : "<unreported>"), (status != null ? status : "<unreported>"), (lastUpTime != null ? Time.makeDateString(lastUpTime) : "<never>"), Time.makeDateString(System.currentTimeMillis())); new Object[] {this, member, Time.makeDateString(memberFailures.get(member)), description}); entity.emit(HASensors.ENTITY_RECOVERED, new HASensors.FailureDescriptor(member, description)); memberFailures.remove(member);
private synchronized void loadManualAdditionsCatalog() { if (manualAdditionsCatalog!=null) return; CatalogDto manualAdditionsCatalogDto = CatalogDto.newNamedInstance( "Manual Catalog Additions", "User-additions to the catalog while Brooklyn is running, " + "created "+Time.makeDateString()); CatalogDo manualAdditionsCatalog = catalog.addCatalog(manualAdditionsCatalogDto); if (manualAdditionsCatalog==null) // not hard to support, but slightly messy -- probably have to use ID's to retrieve the loaded instance throw new UnsupportedOperationException("Catalogs cannot be added until the base catalog is loaded"); log.debug("Creating manual additions catalog for "+mgmt+": "+manualAdditionsCatalog); manualAdditionsClasses = new LoadedClassLoader(); ((AggregateClassLoader)manualAdditionsCatalog.classpath.getLocalClassLoader()).addFirst(manualAdditionsClasses); // expose when we're all done this.manualAdditionsCatalog = manualAdditionsCatalog; }
(isUp != null ? isUp : "<unreported>"), (status != null ? status : "<unreported>"), (lastUpTime != null ? Time.makeDateString(lastUpTime) : "<never>"), Time.makeDateString(System.currentTimeMillis()));