com.sun.sgs.impl.service.nodemap
Class NodeMappingServerImpl.GetIdTask

java.lang.Object
  extended by com.sun.sgs.impl.util.AbstractKernelRunnable
      extended by com.sun.sgs.impl.service.nodemap.NodeMappingServerImpl.GetIdTask
All Implemented Interfaces:
KernelRunnable
Enclosing class:
NodeMappingServerImpl

static class NodeMappingServerImpl.GetIdTask
extends AbstractKernelRunnable

Task which gets an IdentityMO from a data service. This is a separate task so we can retrieve the result. An exception will be thrown if the IdentityMO is not found or the name binding doesn't exist.


Constructor Summary
NodeMappingServerImpl.GetIdTask(DataService dataService, String idkey)
          Create a new instance.
 
Method Summary
 IdentityMO getId()
          The identity MO retrieved from the data store, or null if the task has not yet executed or there was an error while executing.
 void run()
          Runs this KernelRunnable.
 
Methods inherited from class com.sun.sgs.impl.util.AbstractKernelRunnable
getBaseTaskType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeMappingServerImpl.GetIdTask

NodeMappingServerImpl.GetIdTask(DataService dataService,
                                String idkey)
Create a new instance.

Parameters:
dataService - the data service to retrieve from
idkey - Identitifier key
Method Detail

run

public void run()
Runs this KernelRunnable. If this is run by a Scheduler that support re-try logic, and if an Exception is thrown that implements ExceptionRetryStatus then the Scheduler will consult the shouldRetry method of the Exception to see if this task should be re-run. Get the IdentityMO.

Throws:
NameNotBoundException - if no object is bound to the id
ObjectNotFoundException - if the object has been removed

getId

public IdentityMO getId()
The identity MO retrieved from the data store, or null if the task has not yet executed or there was an error while executing.

Returns:
the IdentityMO

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved