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

org.javasimon.source.DisabledStopwatchSource Maven / Gradle / Ivy

There is a newer version: 4.2.0
Show newest version
package org.javasimon.source;

import org.javasimon.Manager;
import org.javasimon.Split;
import org.javasimon.Stopwatch;

/**
 * Disabled stopwatch source.
 *
 * @author Richard "Virgo" Richter
 * @since 3.4
 */
public class DisabledStopwatchSource implements StopwatchSource {
	/**
	 * Singleton instance.
	 */
	private static final DisabledStopwatchSource INSTANCE = new DisabledStopwatchSource();

	/**
	 * Returns a singleton instance.
	 */
	@SuppressWarnings("unchecked")
	public static  DisabledStopwatchSource get() {
		return (DisabledStopwatchSource) INSTANCE;
	}

	@Override
	public Split start(L location) {
		return Split.DISABLED;
	}

	@Override
	public boolean isMonitored(L location) {
		return false;
	}

	@Override
	public Stopwatch getMonitor(L location) {
		return null;
	}

	@Override
	public Manager getManager() {
		return null;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy