Search in sources :

Example 1 with MemoryLocks

use of org.apache.oozie.lock.MemoryLocks in project oozie by apache.

the class MemoryLocksService method instrument.

/**
 * Instruments the memory locks service.
 *
 * @param instr instance to instrument the memory locks service to.
 */
public void instrument(Instrumentation instr) {
    final MemoryLocks finalLocks = this.locks;
    instr.addVariable(INSTRUMENTATION_GROUP, "locks", new Instrumentation.Variable<Long>() {

        public Long getValue() {
            return (long) finalLocks.size();
        }
    });
}
Also used : Instrumentation(org.apache.oozie.util.Instrumentation) MemoryLocks(org.apache.oozie.lock.MemoryLocks)

Aggregations

MemoryLocks (org.apache.oozie.lock.MemoryLocks)1 Instrumentation (org.apache.oozie.util.Instrumentation)1