Examples of find()


Examples of org.apache.sandesha2.storage.beanmanagers.NextMsgBeanMgr.find()

    NextMsgBeanMgr nextMsgBeanMgr = storageManager.getNextMsgBeanMgr();
   
    //removing nextMsgMgr entries
    NextMsgBean findNextMsgBean = new NextMsgBean ();
    findNextMsgBean.setSequenceID(sequenceID);
    Collection collection = nextMsgBeanMgr.find(findNextMsgBean);
    Iterator iterator = collection.iterator();
    while (iterator.hasNext()) {
      NextMsgBean nextMsgBean = (NextMsgBean) iterator.next();
      //nextMsgBeanMgr.delete(nextMsgBean.getSequenceID());
    }
View Full Code Here

Examples of org.apache.sandesha2.storage.beanmanagers.RMDBeanMgr.find()

        RMDBean findBean = new RMDBean ();
        findBean.setPollingMode(true);
        findBean.setToAddress(replyToAddress);

        RMDBeanMgr rmdBeanMgr = storageManager.getRMDBeanMgr();
        List beans = rmdBeanMgr.find(findBean);
        if(beans.isEmpty()) {
          rmsBean.setTerminationPauserForCS(true);
          storageManager.getRMSBeanMgr().update(rmsBean);
          complete = false;
        }
View Full Code Here

Examples of org.apache.sandesha2.storage.beanmanagers.RMSBeanMgr.find()

    RMSBeanMgr rmsBeanMgr = storageManager.getRMSBeanMgr();

    RMSBean rmsFindBean = new RMSBean();
    rmsFindBean.setSequenceID(sequenceId);
    Collection arr = rmsBeanMgr.find(rmsFindBean);

    if (arr.size() > 0) {
      if (log.isDebugEnabled())
        log.debug("Exit: CreateSeqMsgProcessor::offerAccepted, " + false);
      return false;
View Full Code Here

Examples of org.apache.sandesha2.storage.beanmanagers.SenderBeanMgr.find()

      long timeToSend = System.currentTimeMillis() + ackInterval;

      // removing old acks.
      SenderBean findBean = new SenderBean();
      findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
      Collection coll = senderBeanMgr.find(findBean);
      Iterator it = coll.iterator();

      if (it.hasNext()) {
        SenderBean oldAckBean = (SenderBean) it.next();
        // If there is an old Ack. This Ack will be sent in the old timeToSend.
View Full Code Here

Examples of org.apache.sandesha2.storage.beanmanagers.SequencePropertyBeanMgr.find()

    SequencePropertyBeanMgr seqPropBeanMgr = storageManager.getSequencePropertyBeanMgr();

    SequencePropertyBean findSeqIDBean = new SequencePropertyBean();
    findSeqIDBean.setValue(internalSequenceID);
    findSeqIDBean.setName(Sandesha2Constants.SequenceProperties.INTERNAL_SEQUENCE_ID);
    Collection seqIDBeans = seqPropBeanMgr.find(findSeqIDBean);

    if (seqIDBeans.size() == 0) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noSequenceEstablished);
      log.debug(message);
      throw new SandeshaException(message);
View Full Code Here

Examples of org.apache.stanbol.entityhub.servicesapi.Entityhub.find()

            return executeLDPathQuery(entityhub,query, ((LDPathSelect)query).getLDPathSelect(),
                acceptedMediaType, headers);
        } else { //use the default query execution
            QueryResultList<Representation> result;
            try {
                result = entityhub.find(query);
            } catch (EntityhubException e) {
                String message = String.format("Exception while performing the " +
                    "FieldQuery on the EntityHub (message: %s)", e.getMessage());
                log.error(message, e);
                return Response.status(Status.INTERNAL_SERVER_ERROR)
View Full Code Here

Examples of org.apache.stanbol.entityhub.servicesapi.site.ReferencedSite.find()

        }
        FieldQuery query = EntitySearcherUtils.createFieldQuery(site.getQueryFactory(),
            field, includeFields, search, languages);
        QueryResultList<Representation> results;
        try {
            results = site.find(query);
        } catch (ReferencedSiteException e) {
            throw new IllegalStateException("Exception while searchign for "+
                search+'@'+Arrays.toString(languages)+"in the ReferencedSite "+
                site.getId(), e);
        }
View Full Code Here

Examples of org.apache.stanbol.entityhub.servicesapi.site.Site.find()

        if(offset != null && offset.intValue() > 0){
            query.setOffset(offset.intValue());
        }
        QueryResultList<Representation> results;
        try {
            results = site.find(query);
        } catch (SiteException e) {
            throw new IllegalStateException("Exception while searchign for "+
                search+'@'+Arrays.toString(languages)+"in the ReferencedSite "+
                site.getId(), e);
        }
View Full Code Here

Examples of org.apache.stanbol.entityhub.servicesapi.yard.Cache.find()

            // TODO: check if query can be executed based on the base
            // configuration of the Cache
            Cache cache = getCache();
            if (cache != null) {
                try {
                    return cache.find(query);
                } catch (YardException e) {
                    if (siteConfiguration.getEntitySearcherType() == null || isOfflineMode()) {
                        throw new SiteException("Unable to execute query on Cache "
                                + siteConfiguration.getCacheId(), e);
                    } else {
View Full Code Here

Examples of org.apache.stanbol.entityhub.servicesapi.yard.Yard.find()

    public QueryResultList<Representation> find(FieldQuery query) throws YardException, IllegalArgumentException {
        Yard yard = getCacheYard();
        if (yard == null) {
            throw new YardException(String.format("The Yard %s for this cache is currently not available", yardId));
        } else {
            return yard.find(query);
        }
    }

    @Override
    public QueryResultList<String> findReferences(FieldQuery query) throws YardException, IllegalArgumentException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.