class Resource extends BaseObject implements StoredResource
Modifier and Type | Field and Description |
---|---|
private byte[] |
cookie |
private long |
expiration |
(package private) static long |
serialVersionUID |
Constructor and Description |
---|
Resource(StorableResource resource) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
(package private) ByteArrayWrapper |
getCookieAsWrapper() |
int |
hashCode() |
void |
restore(StorableResource obj)
Restore the state of a
StorableResource . |
(package private) void |
setExpiration(long newExpiration) |
restore
static final long serialVersionUID
private final byte[] cookie
private volatile long expiration
Resource(StorableResource resource)
ByteArrayWrapper getCookieAsWrapper()
void setExpiration(long newExpiration)
public void restore(StorableResource obj) throws IOException, ClassNotFoundException
StoredResource
StorableResource
. The resource
to be restored will have its expiration set before this method
returns.
If this method returned a new StorableResource instead of mutating
the passed in StorableResource as a side effect, the implementation
could be thread safe and immutable.restore
in interface StoredResource
obj
- resource to restoreIOException
ClassNotFoundException
LogOps.renewOp(net.jini.id.Uuid, long)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.