Ignore:
Timestamp:
10/15/13 13:21:33 (11 years ago)
Author:
stoda
Message:

Supervisor done

TODO: revise supervisor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/supervisor/src/main/java/omq/common/broker/RemoteBrokerImpl.java

    r92 r103  
    66
    77import omq.exception.RemoteException;
     8import omq.exception.RetryException;
    89import omq.server.RemoteObject;
    910
     
    4344
    4445        @Override
    45         public boolean hasObject(String reference) {
     46        public boolean hasObject(String reference) throws RetryException {
    4647                return getBroker().getRemoteObjs().containsKey(reference);
    4748        }
    4849
     50        @Override
     51        public HasObject hasObjectInfo(String reference) throws RetryException {
     52                if (getBroker().getRemoteObjs().containsKey(reference)) {
     53                        RemoteObject r = getBroker().getRemoteObjs().get(reference);
     54                        int numThreads = r.getPool().getWorkers().size();
     55                        return new HasObject(this.getRef(), reference, true, numThreads);
     56                }
     57                return new HasObject(this.getRef(), reference, false, 0);
     58        }
     59
    4960}
Note: See TracChangeset for help on using the changeset viewer.