Examples of execute()


Examples of java.util.concurrent.ScheduledExecutorService.execute()

        // this should create some potential for the race condition to trigger since it rapidly creates the same keys
        int total = 100000;
        for(int i=0;i<total;i++) {
            // make sure we are actually creating new Strings with no overlap with the other tests
            final String str="shouldSupportConcurrentlyCreatingNewKeys-"+ (i/factor);
            executorService.execute(new Runnable() {

                @Override
                public void run() {
                    o.put(str, str); // this should never fail with null key because of the (hopefully) now fixed EfficientString
                    EfficientString e = EfficientString.fromString(str);
View Full Code Here

Examples of java.util.concurrent.ScheduledThreadPoolExecutor.execute()

        TestTailerListener listener = new TestTailerListener();
        int delay = 100;
        int idle = 50; // allow time for thread to work
        tailer = new Tailer(file, listener, delay, false);
        Executor exec = new ScheduledThreadPoolExecutor(1);
        exec.execute(tailer);
        Thread.sleep(idle);
        tailer.stop();
        tailer=null;
        Thread.sleep(delay+idle);
        assertNull("Should not generate Exception", listener.exception);
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.execute()

              index.hasPositions, index.termProcessor, index.field, ( documentSizes ? new RemoteSizeList( localSocketAddress, index.numberOfDocuments ) : null ), index.properties ), dos );
        dos.flush();
        break;
     
      case GET_INDEX_READER:
        threadPool.execute( new RemoteIndexReader.ServerThread( socket, index ) );
        break;

     
      case GET_TERM_MAP:
        threadPool.execute( new RemoteTermMap.ServerThread( socket, ((BitStreamIndex)index).termMap ) );
View Full Code Here

Examples of javarepl.client.JavaREPLClient.execute()

        Option<EvaluationResult> result = none();
        while (expression.isEmpty() || !result.isEmpty()) {
            expression = expressionReader.readExpression();

            if (!expression.isEmpty()) {
                result = client.execute(expression.get());
                if (!result.isEmpty())
                    console.printEvaluationResult(result.get());
            }
        }
    }
View Full Code Here

Examples of javarepl.console.rest.RestConsole.execute()

            sandboxApplication();

        console.start();

        do {
            console.execute(reader.readExpression().getOrNull());
            logger.info("");
        } while (true);
    }

    private static List<String> initialExpressionsFromFile() {
View Full Code Here

Examples of javax.faces.lifecycle.Lifecycle.execute()

            Lifecycle lifecycle = lifecycleFactory.getLifecycle(lifecycleId);
            ServletFacesContextImpl facesContext = (ServletFacesContextImpl)
            facesContextFactory.getFacesContext
            (getServletContext(), request, response, lifecycle);
            facesContext.setExternalContext(externalContext);
            lifecycle.execute(facesContext);
            facesContext.getApplication()
            .getStateManager().saveSerializedView(facesContext);
        } finally {
            scope.leave();
        }
View Full Code Here

Examples of javax.jcr.SimpleCredentials.execute()

                }
                return null;
            }
        });
       
        return c.execute();
    }
   
    @Test
    public void testHealthCheckFails() throws Exception {
        assertFalse("Expecting failed check", getTestResult("admin:admin").isOk());
View Full Code Here

Examples of javax.jcr.query.Query.execute()

            for (Map.Entry<String, QValue> entry : values.entrySet()) {
                Value value = ValueFormat.getJCRValue(entry.getValue(), sInfo.getNamePathResolver(), sInfo.getSession().getValueFactory());
                query.bindValue(entry.getKey(), value);
            }
        }
        return new QueryInfoImpl(query.execute(), idFactory,
                sInfo.getNamePathResolver(), getQValueFactory());
    }

    /**
     * {@inheritDoc}
 
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModel.execute()

                qomBuilder.getColumns().add(factory.column("event", prop, val));               
            }
        }

        QueryObjectModel qom = qomBuilder.createQOM();
        QueryResultWrapper res = (QueryResultWrapper) qom.execute();
        return res;
    }
   
    private QueryResultWrapper doFilteredQuery(JCRSessionWrapper session, final String... constraints)
            throws RepositoryException {
View Full Code Here

Examples of javax.jdo.Query.execute()

                                                Collection expected,
                                                String assertion) {
        Query q = pm.newQuery();
        q.setClass(PrimitiveTypes.class);
        q.setFilter(filter);
        Collection results = (Collection)q.execute();
        if (debug)
            logger.debug("execute '" + filter + "' returns " +  results.size() +
                         " instance(s)");
        checkQueryResultWithoutOrder(assertion, filter, results, expected);
    }
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.