class OutriggerServerWrapper extends Object implements OutriggerServer, ServerProxyTrust, ProxyAccessor
OutriggerServer.QueryCookie
Landlord.RenewResults
Modifier and Type | Field and Description |
---|---|
private boolean |
allowCalls
If
false , hold calls until it becomes
true |
private OutriggerServerImpl |
delegate
The object being delegated to
|
private Throwable |
failCallsWith
If non-null cause incoming calls to immediately throw this
exception.
|
ABORTED, ACTIVE, COMMITTED, NOTCHANGED, PREPARED, VOTING
Constructor and Description |
---|
OutriggerServerWrapper(ActivationID activationID,
String[] configArgs)
Create an
OutriggerServerWrapper that
will delegate to an OutriggerServerImpl
created with the specified argument and wrapped by this . |
OutriggerServerWrapper(String[] configArgs,
LifeCycle lifeCycle,
boolean persistent)
Create an
OutriggerServerWrapper that
will delegate to a non-activatable OutriggerServerImpl
created with the specified configuration and wrapped by
this . |
Modifier and Type | Method and Description |
---|---|
void |
abort(TransactionManager mgr,
long id)
Requests that the participant roll back any changes for the specified
transaction and unlock any resources locked by the transaction.
|
void |
addLookupAttributes(Entry[] attrSets)
Add attribute sets for the service.
|
void |
addLookupGroups(String[] groups)
Add new groups to the set to join.
|
void |
addLookupLocators(LookupLocator[] locators)
Add locators for specific new lookup services to join.
|
(package private) void |
allowCalls()
Allow incoming calls.
|
void |
cancel(Uuid cookie)
Called by the lease when its
cancel method is
called. |
Map |
cancelAll(Uuid[] cookies)
Called by the lease map when its
cancelAll method is called. |
void |
close(Uuid iterationUuid)
Forget about the indicated iteration
|
void |
commit(TransactionManager mgr,
long id)
Requests that the participant make all of its
PREPARED
changes for the specified transaction visible outside of the
transaction and unlock any resources locked by the transaction. |
MatchSetData |
contents(EntryRep[] tmpls,
Transaction tr,
long leaseTime,
long limit)
Start a new contents query.
|
Uuid |
contents(EntryRep tmpl,
Transaction txn)
Return the remote iterator object needed by
JavaSpaceAdmin.contents . |
void |
delete(Uuid iterationUuid,
Uuid entryUuid)
Delete the given entry if the given iteration is still
valid and the entry was retured by the last call to
nextReps . |
void |
destroy()
Destroy the service, if possible, including its persistent storage.
|
private void |
gate()
Block until calls are allowed, or until calls
are to be rejected.
|
Object |
getAdmin()
Return the admin proxy for this space.
|
Entry[] |
getLookupAttributes()
Get the current attribute sets for the service.
|
String[] |
getLookupGroups()
Get the list of groups to join.
|
LookupLocator[] |
getLookupLocators()
Get the list of locators of specific lookup services to join.
|
Object |
getProxy()
Returns a proxy object for this remote object.
|
TrustVerifier |
getProxyVerifier()
Returns a
TrustVerifier that can be used to verify that
a proxy can be trusted as a proxy for the service; that is, the
isTrustedObject method of the
returned verifier can be called with a candidate proxy. |
Object |
getServiceProxy()
Returns a proxy object for this object.
|
(package private) void |
holdCalls()
Cause incoming calls to block until further notice.
|
void |
modifyLookupAttributes(Entry[] attrSetTemplates,
Entry[] attrSets)
Modify the current attribute sets, using the same semantics as
ServiceRegistration.modifyAttributes.
|
EntryRep[] |
nextBatch(Uuid contentsQueryUuid,
Uuid entryUuid)
Return the next batch of entries associated with the specified
contents query.
|
EntryRep[] |
nextReps(Uuid iterationUuid,
int max,
Uuid entryUuid)
Fetch up to
max EntryRep objects from
the specified iteration. |
EventRegistration |
notify(EntryRep tmpl,
Transaction txn,
RemoteEventListener listener,
long lease,
MarshalledObject handback)
When entries are written that match this template notify the
given
listener . |
int |
prepare(TransactionManager mgr,
long id)
Requests that the participant prepare itself to commit the transaction,
and to vote on the outcome of the transaction.
|
int |
prepareAndCommit(TransactionManager mgr,
long id)
A combination of
prepare and commit , which
can be used by the manager when there is just one participant left to
prepare and all other participants (if any) have responded with
NOTCHANGED . |
Object |
read(EntryRep tmpl,
Transaction txn,
long timeout,
OutriggerServer.QueryCookie cookie)
Find an entry in the space that matches the passed template and
is visible to the passed transaction.
|
Object |
readIfExists(EntryRep tmpl,
Transaction txn,
long timeout,
OutriggerServer.QueryCookie cookie)
Find an entry in the space that matches the passed template and
is visible to the passed transaction.
|
EventRegistration |
registerForAvailabilityEvent(EntryRep[] tmpls,
Transaction txn,
boolean visibilityOnly,
RemoteEventListener listener,
long leaseTime,
MarshalledObject handback)
When entries that match one or more of the passed templates
transition from invisible to visible notify the give
listener . |
(package private) void |
rejectCalls(Throwable t)
Cause in new or blocked calls to fail with
the specified exception.
|
void |
removeLookupGroups(String[] groups)
Remove groups from the set to join.
|
void |
removeLookupLocators(LookupLocator[] locators)
Remove locators for specific lookup services from the set to join.
|
long |
renew(Uuid cookie,
long extension)
Called by the lease when its
renew method is called. |
Landlord.RenewResults |
renewAll(Uuid[] cookies,
long[] durations)
Called by the lease map when its
renewAll method is called. |
void |
setLookupGroups(String[] groups)
Replace the list of groups to join with a new list.
|
void |
setLookupLocators(LookupLocator[] locators)
Replace the list of locators of specific lookup services to join
with a new list.
|
JavaSpace |
space()
Return the space administered by this object.
|
Object |
take(EntryRep[] tmpls,
Transaction tr,
long timeout,
int limit,
OutriggerServer.QueryCookie cookie)
Find and remove up to
limit entries in the space
that match one or more of the passed templates and are visible
to the passed transaction. |
Object |
take(EntryRep tmpl,
Transaction txn,
long timeout,
OutriggerServer.QueryCookie cookie)
Find and remove an entry in the space that matches the passed
template and is visible to the passed transaction.
|
Object |
takeIfExists(EntryRep tmpl,
Transaction txn,
long timeout,
OutriggerServer.QueryCookie cookie)
Find and remove an entry in the space that matches the passed
template and is visible to the passed transaction.
|
long[] |
write(EntryRep[] entries,
Transaction txn,
long[] leaseTimes)
Write a set of entires into the space.
|
long[] |
write(EntryRep entry,
Transaction txn,
long lease)
Write a new entry into the space.
|
private final OutriggerServerImpl delegate
private boolean allowCalls
false
, hold calls until it becomes
true
private Throwable failCallsWith
holdCalls
. This
field is only set to an Error
,
RemoteException
, or RuntimeException
and thus can be thrown by an of OutriggerServer
's
methods.OutriggerServerWrapper(String[] configArgs, LifeCycle lifeCycle, boolean persistent) throws IOException, ConfigurationException, LoginException
OutriggerServerWrapper
that
will delegate to a non-activatable OutriggerServerImpl
created with the specified configuration and wrapped by
this
.configArgs
- set of strings to be used to obtain a
Configuration
.lifeCycle
- the object to notify when this
service is destroyed.persistent
- If true
will throw an
ConfigurationException
if there is no persistence directory or
store specified in the configuration.IOException
- if there is problem exporting the server.ConfigurationException
- if the Configuration
is
malformed.LoginException
- if the loginContext
specified
in the configuration is non-null and throws
an exception when login is attempted.OutriggerServerWrapper(ActivationID activationID, String[] configArgs) throws IOException, ConfigurationException, LoginException, ActivationException
OutriggerServerWrapper
that
will delegate to an OutriggerServerImpl
created with the specified argument and wrapped by this
.activationID
- of the server, must not be null
.configArgs
- set of strings to be used to obtain a
Configuration
.IOException
- if there is problem recovering data
from disk, exporting the server, or unpacking
data
.ConfigurationException
- if the Configuration
is
malformed.ActivationException
- if activatable and there
is a problem getting a reference to the activation system.LoginException
- if the loginContext
specified
in the configuration is non-null and throws
an exception when login is attempted.NullPointerException
- if activationID
is null
.void holdCalls()
void rejectCalls(Throwable t)
IllegalArgumentException
- if t
is not an Error
, RemoteException
,
or RuntimeException
.NullPointerException
- if t
is null
.void allowCalls()
private void gate() throws RemoteException
RemoteException
- If calls are being rejected
with RemoteException
s.RuntimeException
- If calls are being rejected
with RuntimeException
s.Error
- If calls are being rejected
with Error
s.public long[] write(EntryRep entry, Transaction txn, long lease) throws TransactionException, RemoteException
OutriggerServer
write
in interface OutriggerServer
TransactionException
- A transaction error occurredRemoteException
public Object read(EntryRep tmpl, Transaction txn, long timeout, OutriggerServer.QueryCookie cookie) throws TransactionException, RemoteException, InterruptedException
OutriggerServer
timeout
parameter. The proxy may choose to
breakup a query from the client with a very long timeout into a
set of sub-queries. In such cases it may get a
QueryCookie
as response to the sub-queries, in
these cases it should pass the QueryCookie
to the
next sub-query (if any) associated with the same request from
the client.
If a match is found it is returned as an EntryRep
.
If txn
is non-null
the
entry is read locked by the transaction, this allows
other queries to read, but not take the entry. The lock
will be released when the transaction is aborted or prepared.
If no match is found the call will block for up to the
specified timeout for a match to appear. If there
is still no match available the call will return a
QueryCookie
.
read
in interface OutriggerServer
tmpl
- The template that describes the entry being
searched for. May be null
if
any visible entry is acceptable.txn
- The transaction the operation should be
performed under. Maybe be null
.
If non-null and entry is found it
will read locked/removed under this
transaction.timeout
- The maximum number of milliseconds this
call should block in the server before
returning an answer (this not necessarily
the timeout the client asked for.) A value
of 0 indicates the initial search should
be performed, but if no match can be found
null
or a QueryCookie
(as appropriate) should be returned immediately.cookie
- If this call is a continuation of
an earlier query, the cookie from the
last sub-query.TransactionException
- if there is a problem
with the specified transaction such as
it can not be joined, or leaves the active
state before the call is complete.RemoteException
- if a network failure occurs.InterruptedException
- if the thread in the server
is interrupted before the query can be completed.public Object readIfExists(EntryRep tmpl, Transaction txn, long timeout, OutriggerServer.QueryCookie cookie) throws TransactionException, RemoteException, InterruptedException
OutriggerServer
timeout
parameter. The proxy may choose to
breakup a query from the client with a very long timeout into a
set of sub-queries. In such cases it may get a
QueryCookie
as response to the sub-queries, in
these cases it should pass the QueryCookie
to the
next sub-query (if any) associated with the same request from
the client.
If a match is found it is returned as an EntryRep
.
If txn
is non-null
the
entry is read locked by the transaction, this allows
other queries to read, but not take the entry. The lock
will be released when the transaction is aborted or prepared.
If no match can be initially found the call will block until
either the timeout expires or for a detectable period of time
there are no entries in the space (visible to the transaction
or not) that match the passed template. If at some point
there are no matching entries in the space null
will be returned. If the timeout expires and there are matching
entries in the space but none are visible to the passed
transaction a QueryCookie
will be returned.
readIfExists
in interface OutriggerServer
tmpl
- The template that describes the entry being
searched for. May be null
if
any visible entry is acceptable.txn
- The transaction the operation should be
performed under. Maybe be null
.
If non-null and entry is found it
will read locked/removed under this
transaction.timeout
- The maximum number of milliseconds this
call should block in the server before
returning an answer (this not necessarily
the timeout the client asked for.) A value
of 0 indicates the initial search should
be performed, but if no match can be found
null
or a QueryCookie
(as appropriate) should be returned immediately.cookie
- If this call is a continuation of
an earlier query, the cookie from the
last sub-query.TransactionException
- if there is a problem
with the specified transaction such as
it can not be joined, or leaves the active
state before the call is complete.RemoteException
- if a network failure occurs.InterruptedException
- if the thread in the server
is interrupted before the query can be completed.public Object take(EntryRep tmpl, Transaction txn, long timeout, OutriggerServer.QueryCookie cookie) throws TransactionException, RemoteException, InterruptedException
OutriggerServer
timeout
parameter. The proxy may choose to
breakup a query from the client with a very long timeout into a
set of sub-queries. In such cases it may get a
QueryCookie
as response to the sub-queries, in
these cases it should pass the QueryCookie
to the
next sub-query (if any) associated with the same request from
the client.
If a match is found it is returned as an EntryRep
.
If txn
is null
the entry is removed
from the space. If txn
is non-null
the
entry is exclusively locked by the transaction and will be removed
from the space if the transaction is committed.
If no match is found the call will block for up to the
specified timeout for a match to appear. If there
is still no match available the call will return a
QueryCookie
.
take
in interface OutriggerServer
tmpl
- The template that describes the entry being
searched for. May be null
if
any visible entry is acceptable.txn
- The transaction the operation should be
performed under. Maybe be null
.
If non-null and entry is found it
will read locked/removed under this
transaction.timeout
- The maximum number of milliseconds this
call should block in the server before
returning an answer (this not necessarily
the timeout the client asked for.) A value
of 0 indicates the initial search should
be performed, but if no match can be found
null
or a QueryCookie
(as appropriate) should be returned immediately.cookie
- If this call is a continuation of
an earlier query, the cookie from the
last sub-query.TransactionException
- if there is a problem
with the specified transaction such as
it can not be joined, or leaves the active
state before the call is complete.RemoteException
- if a network failure occurs.InterruptedException
- if the thread in the server
is interrupted before the query can be completed.public Object takeIfExists(EntryRep tmpl, Transaction txn, long timeout, OutriggerServer.QueryCookie cookie) throws TransactionException, RemoteException, InterruptedException
OutriggerServer
timeout
parameter. The proxy may choose to
breakup a query from the client with a very long timeout into a
set of sub-queries. In such cases it may get a
QueryCookie
as response to the sub-queries, in
these cases it should pass the QueryCookie
to the
next sub-query (if any) associated with the same request from
the client.
If a match is found it is returned as an EntryRep
.
If txn
is null
the entry is removed
from the space. If txn
is non-null
the
entry is exclusively locked by the transaction and will be removed
from the space if the transaction is committed.
If no match can be initially found the call will block until
either the timeout expires or for a detectable period of time
there are no entries in the space (visible to the transaction
or not) that match the passed template. If at some point there
are no matching entries in the space null
will be
returned. If the timeout expires and there are matching entries
in the space but none are visible to the passed transaction a
QueryCookie
will be returned.
takeIfExists
in interface OutriggerServer
tmpl
- The template that describes the entry being
searched for. May be null
if
any visible entry is acceptable.txn
- The transaction the operation should be
performed under. Maybe be null
.
If non-null and entry is found it
will read locked/removed under this
transaction.timeout
- The maximum number of milliseconds this
call should block in the server before
returning an answer (this not necessarily
the timeout the client asked for.) A value
of 0 indicates the initial search should
be performed, but if no match can be found
null
or a QueryCookie
(as appropriate) should be returned immediately.cookie
- If this call is a continuation of
an earlier query, the cookie from the
last sub-query.TransactionException
- if there is a problem
with the specified transaction such as
it can not be joined, or leaves the active
state before the call is complete.RemoteException
- if a network failure occurs.InterruptedException
- if the thread in the server
is interrupted before the query can be completed.public EventRegistration notify(EntryRep tmpl, Transaction txn, RemoteEventListener listener, long lease, MarshalledObject handback) throws TransactionException, RemoteException
OutriggerServer
listener
. Matching is done as for read
.notify
in interface OutriggerServer
TransactionException
RemoteException
public EventRegistration registerForAvailabilityEvent(EntryRep[] tmpls, Transaction txn, boolean visibilityOnly, RemoteEventListener listener, long leaseTime, MarshalledObject handback) throws TransactionException, RemoteException
OutriggerServer
listener
. Matching is done as for
read
.registerForAvailabilityEvent
in interface OutriggerServer
tmpls
- the templates that specify what entries should
generate eventstxn
- if non-null
entries that become
visible to txn
should generate events even
if txn
is never committed. Registration is
terminated when txn
leaves the active statevisibilityOnly
- if true
, events will
be generated for this registration only when a
matching Entry
transitions from
invisible to visible, otherwise events will be
generated when a matching Entry
makes any transition from unavailable to
availablelistener
- object to notify when an entry becomes (re)visibleleaseTime
- initial requested lease time for the registrationhandback
- object to be included with every notificationTransactionException
- if txn
is
non-null
and not active or otherwise invalidRemoteException
public long[] write(EntryRep[] entries, Transaction txn, long[] leaseTimes) throws TransactionException, RemoteException
OutriggerServer
write
in interface OutriggerServer
Uuid
and then the lower order bits
of the Uuid
.TransactionException
- A transaction error occurredRemoteException
public Object take(EntryRep[] tmpls, Transaction tr, long timeout, int limit, OutriggerServer.QueryCookie cookie) throws TransactionException, RemoteException
OutriggerServer
limit
entries in the space
that match one or more of the passed templates and are visible
to the passed transaction. Depending on the state of the space
and the arguments this call may block if no entry can be
immediately returned. The proxy can specify the maximum period
it is willing to wait for a response using the
timeout
parameter. The proxy may choose to
breakup a query from the client with a very long timeout into a
set of sub-queries. In such cases it may get a
QueryCookie
as response to the sub-queries, in
these cases it should pass the QueryCookie
to the
next sub-query (if any) associated with the same request from
the client.
If matchs are found they are returned as in an array of
EntryRep
. If txn
is
null
the entries are removed from the space. If
txn
is non-null
the entries are
exclusively locked by the transaction and will be removed from
the space if the transaction is committed.
If there are no matches the call will block for up to the
specified timeout for a match to appear. If there is still no
match available the call will return a
QueryCookie
.
take
in interface OutriggerServer
tmpls
- The templates that describes the entries being
searched fortr
- The transaction the operation should be
performed under. Maybe be null
.
If non-null and entries are found they
will removed under this transaction.timeout
- The maximum number of milliseconds this
call should block in the server before
returning an answer (this not necessarily
the timeout the client asked for.) A value
of 0 indicates the initial search should
be performed, but if no match can be found
a QueryCookie
should be
returned immediately.limit
- The maximum number of entries that should be takencookie
- If this call is a continuation of
an earlier query, the cookie from the
last sub-query.TransactionException
- if there is a problem
with the specified transaction such as
it can not be joined, or leaves the active
state before the call is complete.RemoteException
- if a network failure occurs.public MatchSetData contents(EntryRep[] tmpls, Transaction tr, long leaseTime, long limit) throws TransactionException, RemoteException
OutriggerServer
MatchSetData
with the initial batch of
entries and (if applicable) the Uuid
and initial
lease duration. If the entire result set is contained in the
returned MatchSetData
the Uuid
will be null
and the lease duration will be
-1
.contents
in interface OutriggerServer
tmpls
- the templates to use for the iterationtr
- the transaction to perform the iteration under,
may be null
leaseTime
- the requested lease timelimit
- the maximum number of entries to returnMatchSetData
with the initial batch
of entries and (if applicable) the Uuid
and initial
lease duration. Initial batch will be the empty array if
there are no matching entries in the spaceTransactionException
- if
tr
is non-null
and can't be usedRemoteException
public EntryRep[] nextBatch(Uuid contentsQueryUuid, Uuid entryUuid) throws RemoteException
OutriggerServer
nextBatch
in interface OutriggerServer
contentsQueryUuid
- the id of the contents queryentryUuid
- the id of the last entry in the last batch.
If this does not match what the server has on recored
it will re-send the previous batch.EntryRep
s representing
the next batch of entries from the query. Query
is complete if array is not full. Returns an empty
array if there are no entries leftNoSuchObjectException
- if the server has no record
of contentsQueryUuid
RemoteException
public long renew(Uuid cookie, long extension) throws LeaseDeniedException, UnknownLeaseException, RemoteException
Landlord
renew
method is called.
Renews the lease that is associated with the given cookie
.renew
in interface Landlord
cookie
- the Uuid
associated with the lease who's
renew
method was calledextension
- argument passed to the renew
callLeaseDeniedException
- if the landlord is unwilling to
renew the leaseUnknownLeaseException
- if landlord does not know about
a lease with the specified cookie
RemoteException
- if a communications failure occurspublic void cancel(Uuid cookie) throws UnknownLeaseException, RemoteException
Landlord
cancel
method is
called. Cancels the lease that is associated with the given
cookie
.cancel
in interface Landlord
cookie
- the Uuid
associated with the lease who's
renew
method was calledUnknownLeaseException
- if landlord does not know about
a lease with the specified cookie
RemoteException
- if a communications failure occurspublic Object getAdmin() throws RemoteException
OutriggerServer
getAdmin
in interface OutriggerServer
RemoteException
public int prepare(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException
TransactionParticipant
PREPARED
, indicating that it is prepared;
ABORT
, indicating that it will abort, or
NOTCHANGED
, indicating that it did not have any state
changed by the transaction (i.e., it was read-only). If the response
is PREPARED
, the participant must wait until it receives
a commit or abort call from the transaction manager; it may query the
transaction manager if needed as to the state of the transaction. If
the response is ABORT
, the participant should roll its
state back to undo any changes that occurred due to operations
performed under the transaction; it can then discard any information
about the transaction. If the response is NOTCHANGED
, the
participant can immediately discard any knowledge of the transaction.prepare
in interface TransactionParticipant
mgr
- the manager of the transactionid
- the transaction IDint
representing this participant's stateUnknownTransactionException
- if the transaction
is unknown to the transaction manager, either
because the transaction ID is incorrect or because the
transaction is complete and its state has been
discarded by the manager.RemoteException
- if there is a communication errorpublic void commit(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException
TransactionParticipant
PREPARED
changes for the specified transaction visible outside of the
transaction and unlock any resources locked by the transaction.
All state associated with the transaction can then be discarded
by the participant.commit
in interface TransactionParticipant
mgr
- the manager of the transactionid
- the transaction IDUnknownTransactionException
- if the transaction
is unknown to the transaction manager, either
because the transaction ID is incorrect or because the
transaction is complete and its state has been
discarded by the manager.RemoteException
- if there is a communication errorpublic void abort(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException
TransactionParticipant
abort
in interface TransactionParticipant
mgr
- the manager of the transactionid
- the transaction IDUnknownTransactionException
- if the transaction
is unknown to the transaction manager, either
because the transaction ID is incorrect or because the
transaction is complete and its state has been
discarded by the manager.RemoteException
- if there is a communication errorpublic int prepareAndCommit(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException
TransactionParticipant
prepare
and commit
, which
can be used by the manager when there is just one participant left to
prepare and all other participants (if any) have responded with
NOTCHANGED
. The participant's implementation of this
method must be equivalent to:
public int prepareAndCommit(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException { int result = prepare(mgr, id); if (result == PREPARED) { commit(mgr, id); result = COMMITTED; } return result; }
prepareAndCommit
in interface TransactionParticipant
mgr
- the manager of the transactionid
- the transaction IDint
representing its stateUnknownTransactionException
- if the transaction
is unknown to the transaction manager, either
because the transaction ID is incorrect or because the
transaction is complete and its state has been
discarded by the manager.RemoteException
- if there is a communication errorTransactionParticipant.prepare(net.jini.core.transaction.server.TransactionManager, long)
,
TransactionParticipant.commit(net.jini.core.transaction.server.TransactionManager, long)
public Landlord.RenewResults renewAll(Uuid[] cookies, long[] durations) throws RemoteException
Landlord
renewAll
method is called. Should renew the lease that is
associated with each element of cookies
renewAll
in interface Landlord
cookies
- an array of Uuid
s, each universally and
uniquely identifying a lease granted by this
Landlord
durations
- an array of longs, each representing an a
duration in milliseconds that the client
wants the lease associated with the Uuid
from the corresponding element of
cookies
renewed forRemoteException
- if a communications failure occurspublic Map cancelAll(Uuid[] cookies) throws RemoteException
Landlord
cancelAll
method is called. Should cancel the lease that is
associated with each element of cookies
cancelAll
in interface Landlord
cookies
- an array of Uuid
s, each universally and
uniquely identifying a lease granted by this
Landlord
cookies
could be cancelled return null
. Otherwise,
return a Map
that for each failed cancel
attempt maps the corresponding cookie object to an
exception describing the failure.RemoteException
- if a communications failure occurspublic Object getServiceProxy() throws RemoteException
ServiceProxyAccessor
null
.getServiceProxy
in interface ServiceProxyAccessor
RemoteException
public JavaSpace space() throws RemoteException
OutriggerAdmin
space
in interface OutriggerAdmin
RemoteException
public Uuid contents(EntryRep tmpl, Transaction txn) throws TransactionException, RemoteException
OutriggerAdmin
JavaSpaceAdmin.contents
.contents
in interface OutriggerAdmin
TransactionException
RemoteException
public EntryRep[] nextReps(Uuid iterationUuid, int max, Uuid entryUuid) throws RemoteException
OutriggerAdmin
max
EntryRep
objects from
the specified iteration.nextReps
in interface OutriggerAdmin
iterationUuid
- The Uuid
of the iteration
to fetch entries from.max
- Advice on the number of entries to returnentryUuid
- Uuid
of the last entry received by the
caller. If this does not match the ID of the last
entry sent by the iterator will re-send that last
batch in place of a new batch. May be
null
in which case a new batch will be
sent. The first call to next()
should
have id
set to null
RemoteException
public void delete(Uuid iterationUuid, Uuid entryUuid) throws RemoteException
OutriggerAdmin
nextReps
.delete
in interface OutriggerAdmin
iterationUuid
- The Uuid
of a valid
iteration.entryUuid
- the Uuid
of the entry
to be deleted.RemoteException
public void close(Uuid iterationUuid) throws RemoteException
OutriggerAdmin
close
in interface OutriggerAdmin
iterationUuid
- The Uuid
iteration to close.RemoteException
public void destroy() throws RemoteException
DestroyAdmin
destroy
in interface DestroyAdmin
RemoteException
public Entry[] getLookupAttributes() throws RemoteException
JoinAdmin
getLookupAttributes
in interface JoinAdmin
RemoteException
public void addLookupAttributes(Entry[] attrSets) throws RemoteException
JoinAdmin
addLookupAttributes
in interface JoinAdmin
attrSets
- the attribute sets to addRemoteException
public void modifyLookupAttributes(Entry[] attrSetTemplates, Entry[] attrSets) throws RemoteException
JoinAdmin
modifyLookupAttributes
in interface JoinAdmin
attrSetTemplates
- the templates for matching attribute setsattrSets
- the modifications to make to matching setsRemoteException
ServiceRegistration.modifyAttributes(net.jini.core.entry.Entry[], net.jini.core.entry.Entry[])
public String[] getLookupGroups() throws RemoteException
JoinAdmin
getLookupGroups
in interface JoinAdmin
RemoteException
JoinAdmin.setLookupGroups(java.lang.String[])
public void addLookupGroups(String[] groups) throws RemoteException
JoinAdmin
addLookupGroups
in interface JoinAdmin
groups
- groups to joinRemoteException
JoinAdmin.removeLookupGroups(java.lang.String[])
public void removeLookupGroups(String[] groups) throws RemoteException
JoinAdmin
removeLookupGroups
in interface JoinAdmin
groups
- groups to leaveRemoteException
JoinAdmin.addLookupGroups(java.lang.String[])
public void setLookupGroups(String[] groups) throws RemoteException
JoinAdmin
setLookupGroups
in interface JoinAdmin
groups
- groups to joinRemoteException
JoinAdmin.getLookupGroups()
public LookupLocator[] getLookupLocators() throws RemoteException
JoinAdmin
getLookupLocators
in interface JoinAdmin
RemoteException
JoinAdmin.setLookupLocators(net.jini.core.discovery.LookupLocator[])
public void addLookupLocators(LookupLocator[] locators) throws RemoteException
JoinAdmin
addLookupLocators
in interface JoinAdmin
locators
- locators of specific lookup services to joinRemoteException
JoinAdmin.removeLookupLocators(net.jini.core.discovery.LookupLocator[])
public void removeLookupLocators(LookupLocator[] locators) throws RemoteException
JoinAdmin
removeLookupLocators
in interface JoinAdmin
locators
- locators of specific lookup services to leaveRemoteException
JoinAdmin.addLookupLocators(net.jini.core.discovery.LookupLocator[])
public void setLookupLocators(LookupLocator[] locators) throws RemoteException
JoinAdmin
setLookupLocators
in interface JoinAdmin
locators
- locators of specific lookup services to joinRemoteException
JoinAdmin.getLookupLocators()
public Object getProxy()
ProxyAccessor
null
is returned.getProxy
in interface ProxyAccessor
null
public TrustVerifier getProxyVerifier() throws RemoteException
ServerProxyTrust
TrustVerifier
that can be used to verify that
a proxy can be trusted as a proxy for the service; that is, the
isTrustedObject
method of the
returned verifier can be called with a candidate proxy. The verifier
should be able to verify all proxies for the service, including
proxies for resources (such as leases and registrations).getProxyVerifier
in interface ServerProxyTrust
TrustVerifier
that can be used to verify that
a proxy can be trusted as a proxy for the serviceRemoteException
- if a communication-related exception occursCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.