Examples of Work


Examples of javax.resource.spi.work.Work

     }

     public void run() {
   while (true) {
       try {
     Work run = null;
     boolean haswait = false;
     synchronized (workList) {
         while (workList.isEmpty()) {
       if ((haswait && freeThreads > minpoolsz) || !valid) {
           poolsz--;
View Full Code Here

Examples of javax.resource.spi.work.Work

    }
   
    @Test public void testSchedule() throws Exception {
      ThreadReuseExecutor pool = new ThreadReuseExecutor("test", 5); //$NON-NLS-1$
        final ArrayList<String> result = new ArrayList<String>();
      pool.schedule(new Work() {
     
      @Override
      public void run() {
          result.add("hello"); //$NON-NLS-1$
      }
View Full Code Here

Examples of javax.resource.spi.work.Work

    }
   
    @Test public void testFailingWork() throws Exception {
      ThreadReuseExecutor pool = new ThreadReuseExecutor("test", 5); //$NON-NLS-1$
      final AtomicInteger count = new AtomicInteger();
      pool.execute(new Work() {
        @Override
        public void run() {
          count.getAndIncrement();
          throw new RuntimeException();
        }
View Full Code Here

Examples of javax.resource.spi.work.Work

        final ModuleContext currentModuleContext=CurrentModuleContext.getContext();
       
        // Schedule the invocation of the next interceptor in a new Work instance
        try {
            workManager.scheduleWork(new Work() {
               
                public void run() {
                    ModuleContext oldModuleContext=CurrentModuleContext.getContext();
                    try {
                        BINDER.setContext(currentModuleContext);
View Full Code Here

Examples of ke.go.moh.oec.Work

        personRequest.setRequestReference(session.getReference());
        return personRequest;
    }

    private Work createDummyWork() {
        Work work = new Work();
        work.setNotificationId("-1");
        work.setReassignAddress(OECReception.applicationAddress());
        work.setSourceAddress(OECReception.applicationAddress());
        return work;
    }
View Full Code Here

Examples of net.sdiz.bitcoin.Work

  public void setUp() {
    scanHash = new ScanHash();
  }

  public void testScanHashNegative() {
    Work work = new Work(
        "00000001569be4f2b5b23e745240aaa149084029850973b78b0c5ce40002f41600000000f1c3d9c8a8a701275715da32e577521340180146e3517c8ebb1d0044feaa9f3f4d1d355d1b04864c00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000",
        "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000",
        "ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000",
        "babe3a22106e8bd2274bcb1571042c5dde2ee927a3fb62606938ab8ae7b241ba");
    Assert.assertFalse("No match for casial hash",
View Full Code Here

Examples of nexj.core.persistence.Work

    */
   protected void execute(Work[] workArray, int nStart, int nEnd)
   {
      while (nStart < nEnd)
      {
         Work work = workArray[nStart];
         int nStartSaved = nStart;

         for (++nStart; nStart < nEnd; ++nStart)
         {
            if (!workArray[nStart].isBatchableWith(work))
            {
               break;
            }
         }

         try
         {
            work.getAdapter().execute(workArray, nStartSaved, nStart);
         }
         catch (UncheckedException e)
         {
            List instanceList = new ArrayList(nStart - nStartSaved);

View Full Code Here

Examples of org.aburlacu.test.model.Work

    }

    @RequestMapping(value = { "/work.html", "work.html" })
    public String listWorks(Map<String, Object> map) {

        map.put("work", new Work());
        map.put("workList", workService.listWork());
       
        //add  statuses
        ArrayList statusList = new ArrayList();
        statusList.add("In progress");
View Full Code Here

Examples of org.apache.cassandra.concurrent.SEPWorker.Work

    boolean maybeSchedule()
    {
        if (pool.spinningCount.get() > 0 || !takeWorkPermit(true))
            return false;

        pool.schedule(new Work(this));
        return true;
    }
View Full Code Here

Examples of org.drools.core.process.core.Work

        Composite composite = (Composite) super.createDialogArea(parent);
        GridLayout gridLayout = new GridLayout();
        gridLayout.numColumns = 2;
        composite.setLayout(gridLayout);
       
        Work work = (Work) getValue();
       
        Label nameLabel = new Label(composite, SWT.NONE);
        nameLabel.setText("Name: ");
        Text nameText = new Text(composite, SWT.NONE);
        nameText.setEditable(false);
        GridData gridData = new GridData();
        gridData.grabExcessHorizontalSpace = true;
        gridData.horizontalAlignment = GridData.FILL;
        nameText.setLayoutData(gridData);
        String name = work.getName();
        nameText.setText(name == null ? "" : name);
       
        Set<ParameterDefinition> parameters = workDefinition.getParameters();
        for (ParameterDefinition param: parameters) {
            Label label = new Label(composite, SWT.NONE);
            label.setText(param.getName() + ": ");
            Text text = new Text(composite, SWT.NONE);
            gridData = new GridData();
            gridData.grabExcessHorizontalSpace = true;
            gridData.horizontalAlignment = GridData.FILL;
            text.setLayoutData(gridData);
            texts.put(param.getName(), text);
            Object value = work.getParameter(param.getName());
            text.setText(value == null ? "" : value.toString());
        }
       
        return composite;
    }
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.