public class InternalServerProxy extends Object
| Constructor and Description |
|---|
InternalServerProxy(long waitingTime,
String clientName)
InternalServer ctor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
activate()
re activate the server if it is down.
|
boolean |
equals(Object o) |
int |
getCurrentNumberOfAttempts()
get the number of times the server was invoked until now.
|
long |
getFailedAttemptTimeStamp()
get the time stamp for the last time a failure occurred while activating
the server.
|
String |
getHost()
get the host of this instance server.
|
int |
getMaxNumberOfAttempts()
get the number of times to retry invoking a server before it is
passivated.
|
Integer |
getPort()
get the port of this instance server.
|
AtomicBoolean |
getReactivated() |
long |
getRetryDelay()
get the delay period in milliseconds between attempts of re-invoking a
failing server.
|
int |
hashCode() |
boolean |
isActive()
get the active state flag, with out any logic (opposite to activate())
|
void |
passivate()
passivate the server causing it to be inactive.
|
void |
processFailureAttempt()
process actions when an attempt to access server has failed.
|
void |
setCurrentNumberOfAttempts(int currentNumberOfAttempts)
set the number of times the server was invoked until now.
|
void |
setFailedAttemptTimeStamp(long failedAttemptTimeStamp)
set the time stamp for the last time a failure occurred while activating
the server.
|
void |
setHost(String host)
set the host of this instance server.
|
void |
setMaxNumberOfAttempts(int numberOfRetries)
set the maximum number of times to retry invoking a server before it is
passivated.
|
void |
setPort(Integer port)
set the port of this instance server.
|
void |
setRetryDelay(long retryDelay)
set the delay period in milliseconds between attempts of re-invoking a
failing server.
|
String |
toString() |
public InternalServerProxy(long waitingTime,
String clientName)
waitingTime - - the time to wait while inactive before re activating.clientName - public void passivate()
public boolean activate()
public long getFailedAttemptTimeStamp()
public void setFailedAttemptTimeStamp(long failedAttemptTimeStamp)
failedAttemptTimeStamp - the time stamp for the last time a failure occurred while
activating the server.public int getMaxNumberOfAttempts()
public void setMaxNumberOfAttempts(int numberOfRetries)
numberOfRetries - the number of times to retry invoking a server before it is
passivated.public long getRetryDelay()
public void setRetryDelay(long retryDelay)
retryDelay - the delay period in milliseconds between attempts of
re-invoking a failing server.public int getCurrentNumberOfAttempts()
public void setCurrentNumberOfAttempts(int currentNumberOfAttempts)
currentNumberOfAttempts - the number of times the server was invoked until now.public boolean isActive()
public void processFailureAttempt()
public String getHost()
public void setHost(String host)
host - the host of this instance server.public Integer getPort()
public void setPort(Integer port)
port - the port of this instance server.public AtomicBoolean getReactivated()
Copyright © 2015 Cisco. All rights reserved.