Skip to content

arosien/failure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A failure detector as described in "The Phi Accrual Failure Detector" (Hayashibara, et al., 2004).

Example:

    import asr.failure.FailureDetector;

    final FailureDetector detector = new FailureDetector(windowSize, minSamples);

    new Thread(new Runnable() {
        public void run() {
            while (doingStuff) {
                detector.recordHeartbeat(System.currentTimeMillis());
            }
        }
    ).start();

    while (doingOtherStuff) {
        Double phi = detector.phi(System.currentTimeMillis());

        if (phi != null && phi > threshold) {
            // failure!
        }
    }

Releases

No releases published

Packages

No packages published

Languages