Tabnine Logo
ApplicationUsage$ApplicationEvent
Code IndexAdd Tabnine to your IDE (free)

How to use
ApplicationUsage$ApplicationEvent
in
brooklyn.management.usage

Best Java code snippets using brooklyn.management.usage.ApplicationUsage$ApplicationEvent (Showing top 2 results out of 315)

origin: io.brooklyn/brooklyn-rest-server

Date eventStartDate = current.getDate();
Date eventEndDate;
  eventEndDate = next.getDate();
} else if (current.getState() == Lifecycle.DESTROYED) {
  eventEndDate = eventStartDate;
} else {
UsageStatistic statistic = new UsageStatistic(ApplicationTransformer.statusFromLifecycle(current.getState()), usage.getApplicationId(), usage.getApplicationId(), format(eventStartDate), format(eventEndDate), duration, usage.getMetadata());
log.trace("Adding application usage statistic to response for app {}: {}", usage.getApplicationId(), statistic);
result.add(statistic);
origin: io.brooklyn/brooklyn-core

@Override
public void recordApplicationEvent(Application app, Lifecycle state) {
  log.debug("Storing location lifecycle event: application {} in state {};", new Object[] {app, state});
  ConcurrentMap<String, ApplicationUsage> eventMap = managementContext.getStorage().getMap(APPLICATION_USAGE_KEY);
  synchronized (mutex) {
    ApplicationUsage usage = eventMap.get(app.getId());
    if (usage == null) {
      usage = new ApplicationUsage(app.getId(), app.getDisplayName(), app.getEntityType().getName(), ((EntityInternal)app).toMetadataRecord());
    }
    usage.addEvent(new ApplicationUsage.ApplicationEvent(state));        
    eventMap.put(app.getId(), usage);
  }
}

brooklyn.management.usageApplicationUsage$ApplicationEvent

Most used methods

  • <init>
  • getDate
  • getState

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now