/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2013-2014 ForgeRock AS. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
*/
public class InstanceState {
private int state;
private int recoveryAttempts;
private long startup;
private long shutdown;
private long timestamp;
private long detectedDown;
private long recoveryStarted;
private long recoveryFinished;
private long recoveringTimestamp;
this.instanceId = instanceId;
}
this.instanceId = instanceId;
this.state = STATE_RUNNING;
this.shutdown = 0L;
this.recoveringTimestamp = 0L;
this.recoveringInstanceId = null;
this.recoveryStarted = 0L;
this.recoveryFinished = 0L;
this.detectedDown = 0L;
this.recoveryAttempts = 0;
}
return map;
}
return true;
}
return false;
}
if (state == STATE_PROCESSING_DOWN &&
return true;
}
return false;
}
public boolean hasShutdown() {
if (shutdown == 0L) {
return false;
}
return true;
}
public void updateStartup() {
}
public void updateShutdown() {
}
public void updateTimestamp() {
}
public void updateRecoveringTimestamp() {
}
public void updateDetectedDown() {
}
return instanceId;
}
public int getState() {
return state;
}
public long getTimestamp() {
return timestamp;
}
public long getStartup() {
return startup;
}
public long getShutdown() {
return shutdown;
}
public long getDetectedDown() {
return detectedDown;
}
public long getRecoveringTimestamp() {
return recoveringTimestamp;
}
return recoveringInstanceId;
}
public int getRecoveryAttempts() {
return recoveryAttempts;
}
public long getUptime() {
}
return rev;
}
public void clearShutdown() {
shutdown = 0L;
}
public void clearDetectedDown() {
detectedDown = 0L;
}
public void clearRecoveryAttempts() {
recoveryAttempts = 0;
}
}
this.instanceId = instanceId;
}
}
public long getRecoveryStarted() {
return recoveryStarted;
}
public void startRecovery() {
}
public long getRecoveryFinished() {
return recoveryFinished;
}
public void finishRecovery() {
}
}
}