public class CounterFactory extends Object
CounterFactory.getInstance().setCounter(new SysoCounter());
SysoCounter is just an example of a Counter implementation. It writes info about files being read and written to the System.out. This functionality can be used to create metrics in a SaaS context.
Modifier and Type | Method and Description |
---|---|
Counter |
getCounter()
Getter for the counter.
|
static Counter |
getCounter(Class> klass)
Returns a counter factory.
|
static CounterFactory |
getInstance()
Returns the singleton instance of the factory.
|
void |
setCounter(Counter counter)
Setter for the counter.
|
public static CounterFactory getInstance()
public Counter getCounter()
public void setCounter(Counter counter)
Copyright © 2016. All rights reserved.