Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008, 2010 VMware Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: VMware Inc. - initial contribution /
package org.eclipse.virgo.nano.core.internal.blueprint;


Ticker provides a heartbeat interface for tracking unanticipated delays. The heartbeat is configurable using a Ticker.HeartBeatPolicy.

Concurrent Semantics
Implementations of this interface must be thread safe.

public interface Ticker {

    
Cancel this Ticker.

Returns:
true if and only this Ticker has ticked at least once
    boolean cancel();

    
Ticker.HeartBeatPolicy is an interface for configuring heartbeat intervals.

Concurrent Semantics
Implementations of this interface should be thread safe to avoid potential abuse.

    public static interface HeartBeatPolicy {

        
Return the heartbeat interval and update the next interval according to the policy.

Returns:
the heartbeat interval in milliseconds
        long getNextHeartBeatIntervalMillis();
    }
New to GrepCode? Check out our FAQ X