All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.sitebricks.routing.SystemMetrics Maven / Gradle / Ivy

The newest version!
package com.google.sitebricks.routing;

import com.google.inject.ImplementedBy;
import com.google.sitebricks.compiler.CompileError;

import java.util.List;

/**
 * Keeps track of various global performance and error metrics.
 * 
 * @author Dhanji R. Prasanna ([email protected])
 */
@ImplementedBy(InMemorySystemMetrics.class)
public interface SystemMetrics {
    /**
     * Records the last page render time for the given page (in millis).
     * This method is concurrent and does not guarantee that the last
     * render time accurately reflects the last page delivered to a user.
     */
    void logPageRenderTime(Class page, long time);

    /**
     * This sets the current errors and warnings list as given, globally.
     * This method is thread-safe.
     */
    void logErrorsAndWarnings(Class page, List errors, List warnings);

    /**
     * Puts the system into a ready state. This is used by Sitebricks to
     * determine whether we're in the compile phase.
     */
    void activate();

    /**
     * @return Returns true if the application is ready to begin processing
     * requests, false if Sitebricks is still in the compile phase.
     */
    boolean isActive();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy