com.sun.jini.outrigger.snaplogstore
Class Resource
java.lang.Object
com.sun.jini.outrigger.snaplogstore.BaseObject
com.sun.jini.outrigger.snaplogstore.Resource
- All Implemented Interfaces:
- StoredObject, StoredResource, Serializable
- Direct Known Subclasses:
- Registration
class Resource
- extends BaseObject
- implements StoredResource
Wrapper for outrigger objects that are leased resources.
This class records renews so that the
stored resource can be updated while the target is serialized.
When the stored resource is deserialized the (potentially)
updated expiration is set in the resource before it is returned.
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
cookie
private byte[] cookie
expiration
private long expiration
Resource
Resource(StorableResource resource)
getCookieAsWrapper
ByteArrayWrapper getCookieAsWrapper()
setExpiration
void setExpiration(long newExpiration)
restore
public void restore(StorableResource obj)
throws IOException,
ClassNotFoundException
- Description copied from interface:
StoredResource
- Restore the state of a
StorableResource
. The resource
to be restored will have its expiration set before this method
returns.
- Specified by:
restore
in interface StoredResource
- Parameters:
obj
- resource to restore
- Throws:
IOException
ClassNotFoundException
- See Also:
LogOps.renewOp(net.jini.id.Uuid, long)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.