|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jini.core.constraint.ConnectionRelativeTime
public final class ConnectionRelativeTime
Represents a constraint on the maximum amount of time to wait for a
network connection to be established. The precise meaning of this will
vary across communication mechanisms, but in the typical case of
Socket
-based communication, the intention is that this
constraint controls the timeout parameter of the
connect
method.
The duration is translated into an absolute end time at the point of a remote call by adding the caller's current time.
Constructor Summary | |
---|---|
ConnectionRelativeTime(long time)
Creates a constraint with the specified duration. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Two instances of this class are equal if both have the same duration. |
long |
getTime()
Returns the maximum connection duration in milliseconds. |
int |
hashCode()
Returns a hash code value for this object. |
InvocationConstraint |
makeAbsolute(long baseTime)
Returns a ConnectionAbsoluteTime instance with time obtained
by adding the specified base time argument to the duration value
from this instance. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConnectionRelativeTime(long time)
time
- the maximum connection duration in milliseconds
IllegalArgumentException
- if the argument is less than zeroMethod Detail |
---|
public long getTime()
public InvocationConstraint makeAbsolute(long baseTime)
ConnectionAbsoluteTime
instance with time obtained
by adding the specified base time argument to the duration value
from this instance. If the addition results in overflow, a time value
of Long.MAX_VALUE
is used.
makeAbsolute
in interface RelativeTimeConstraint
baseTime
- an absolute time, specified in milliseconds from
midnight, January 1, 1970 UTC
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |