|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by servers that export a JavaSpaces(TM) technology service. The operations in this interface are the public methods that all such spaces support.
Entry
Field Summary | |
static long |
NO_WAIT
Wait for no time at all. |
Method Summary | |
EventRegistration |
notify(Entry tmpl,
Transaction txn,
RemoteEventListener listener,
long lease,
java.rmi.MarshalledObject handback)
When entries are written that match this template notify the given listener with a RemoteEvent that
includes the handback object. |
Entry |
read(Entry tmpl,
Transaction txn,
long timeout)
Read any matching entry from the space, blocking until one exists. |
Entry |
readIfExists(Entry tmpl,
Transaction txn,
long timeout)
Read any matching entry from the space, returning null if there is currently is none. |
Entry |
snapshot(Entry e)
Return a snapshot of the given entry. |
Entry |
take(Entry tmpl,
Transaction txn,
long timeout)
Take a matching entry from the space, waiting until one exists. |
Entry |
takeIfExists(Entry tmpl,
Transaction txn,
long timeout)
Take a matching entry from the space, returning null if there is currently is none. |
Lease |
write(Entry entry,
Transaction txn,
long lease)
Write a new entry into the space. |
Field Detail |
public static final long NO_WAIT
read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)
,
readIfExists(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)
,
take(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)
,
takeIfExists(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)
Method Detail |
public Lease write(Entry entry, Transaction txn, long lease) throws TransactionException, java.lang.SecurityException, java.rmi.RemoteException
public Entry read(Entry tmpl, Transaction txn, long timeout) throws UnusableEntryException, TransactionException, java.lang.SecurityException, java.lang.InterruptedException, java.rmi.RemoteException
null
if the timeout expires.tmpl
- The template used for matching. Matching is
done against tmpl
with blank
fields being wildcards ("match anything") other
fields being values ("match exactly on the
serialized form").txn
- The transaction (if any) under which to work.timeout
- How long the client is willing to wait for a
transactionally proper matching entry. A
timeout of NO_WAIT
means to wait
no time at all; this is equivalent to a wait
of zero.public Entry readIfExists(Entry tmpl, Transaction txn, long timeout) throws UnusableEntryException, TransactionException, java.lang.SecurityException, java.lang.InterruptedException, java.rmi.RemoteException
null
if there is currently is none. Matching and
timeouts are done as in read
, except that blocking
in this call is done only if necessary to wait for transactional
state to settle.read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)
public Entry take(Entry tmpl, Transaction txn, long timeout) throws UnusableEntryException, TransactionException, java.lang.SecurityException, java.lang.InterruptedException, java.rmi.RemoteException
read
.read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)
public Entry takeIfExists(Entry tmpl, Transaction txn, long timeout) throws UnusableEntryException, TransactionException, java.lang.SecurityException, java.lang.InterruptedException, java.rmi.RemoteException
null
if there is currently is none. Matching is
and timeout done as for read
, except that blocking
in this call is done only if necessary to wait for transactional
state to settle.read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)
public EventRegistration notify(Entry tmpl, Transaction txn, RemoteEventListener listener, long lease, java.rmi.MarshalledObject handback) throws TransactionException, java.lang.SecurityException, java.rmi.RemoteException
listener
with a RemoteEvent
that
includes the handback
object. Matching is done as
for read
.read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)
,
EventRegistration
public Entry snapshot(Entry e) throws java.rmi.RemoteException
JavaSpace
interface the snapshot more efficient to
use than repeated uses of the original entry.
Using a snapshot with a different space than the one that produced it yields unpredictable results.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |