Package org.apache.commons.lang.time

Examples of org.apache.commons.lang.time.StopWatch.start()


                "Unable to initialize the Redback Security Environment, " + "no Environment Check components found." );
        }

        StopWatch stopWatch = new StopWatch();
        stopWatch.reset();
        stopWatch.start();

        List<String> violations = new ArrayList<>();

        for ( Entry<String, EnvironmentCheck> entry : checkers.entrySet() )
        {
View Full Code Here


    @Override
    public RepositoryStatistics getLastStatistics( MetadataRepository metadataRepository, String repositoryId )
        throws MetadataRepositoryException
    {
        StopWatch stopWatch = new StopWatch();
        stopWatch.start();
        // TODO: consider a more efficient implementation that directly gets the last one from the content repository
        List<String> scans = metadataRepository.getMetadataFacets( repositoryId, RepositoryStatistics.FACET_ID );
        if ( scans == null )
        {
            return null;
View Full Code Here

        {
            return;
        }

        StopWatch stopWatch = new StopWatch();
        stopWatch.start();

        metadataFacetFactories = applicationContext.getBeansOfType( MetadataFacetFactory.class );
        // olamy with spring the "id" is now "metadataFacetFactory#hint"
        // whereas was only hint with plexus so let remove  metadataFacetFactory#
        Map<String, MetadataFacetFactory> cleanedMetadataFacetFactories =
View Full Code Here

     * @throws IOException in case of I/O errors
     * @throws ServiceException in case of Google Data API errors
     */
    public InputStream downloadFile(String exportUrl) throws IOException, MalformedURLException, ServiceException {
        StopWatch watch = new StopWatch();
        watch.start();
        logger.info("Retrieving content for document from: " + exportUrl);

        MediaContent mc = new MediaContent();
        mc.setUri(exportUrl);
        MediaSource ms = service.getMedia(mc);
View Full Code Here

     * @throws ServiceException in case of Google Data API errors
     */
    public void downloadFile(String exportUrl, OutputStream out) throws IOException, MalformedURLException,
            ServiceException {
        StopWatch watch = new StopWatch();
        watch.start();
        logger.info("Exporting document from: " + exportUrl);

        MediaContent mc = new MediaContent();
        mc.setUri(exportUrl);
        MediaSource ms = service.getMedia(mc);
View Full Code Here

     * @throws IOException in case of I/O errors
     * @throws ServiceException in case of Google Data API errors
     */
    protected DocumentListEntry getDefaultTargetFolder() throws IOException, ServiceException {
        StopWatch watch = new StopWatch();
        watch.start();
        DocumentListEntry folder = null;
        DocumentListFeed feed = service.getFeed(new URL("https://docs.google.com/"
                + "feeds/default/private/full/folder%3Aroot/contents/-/folder?title=" + defaultTargetFolderName),
                DocumentListFeed.class);
        List<DocumentListEntry> entries = feed.getEntries();
View Full Code Here

     * @throws IOException in case of I/O errors
     * @throws ServiceException in case of Google Data API errors
     */
    protected DocumentListEntry upload(File file, URL targetFolderUri) throws IOException, ServiceException {
        StopWatch watch = new StopWatch();
        watch.start();
        logger.info("Uploading content for: " + file.getName());
        DocumentListEntry newDocument = new DocumentListEntry();
        String mimeType = DocumentListEntry.MediaType.fromFileName(file.getName()).getMimeType();
        newDocument.setFile(file, mimeType);
        newDocument.setTitle(new PlainTextConstruct(file.getName()));
View Full Code Here

     * @throws ServiceException in case of Google Data API errors
     */
    protected DocumentListEntry upload(InputStream fileStream, String documentTitle, String mimeType,
            URL targetFolderUri) throws IOException, ServiceException {
        StopWatch watch = new StopWatch();
        watch.start();
        logger.info("Uploading content for: " + documentTitle);

        DocumentListEntry newDocument = new DocumentListEntry();
        newDocument.setTitle(new PlainTextConstruct(documentTitle));

View Full Code Here

            if( req != null && m_akismet != null )
            {
                log.debug("Calling Akismet to check for spam...");

                StopWatch sw = new StopWatch();
                sw.start();

                String ipAddress     = req.getRemoteAddr();
                String userAgent     = req.getHeader("User-Agent");
                String referrer      = req.getHeader( "Referer");
                String permalink     = context.getViewURL( context.getPage().getName() );
View Full Code Here

        m_engine.saveText( "TestPage", TEST_TEXT );
       
        StopWatch sw = new StopWatch();
       
        System.out.println("DOM cache speed test:");
        sw.start();
       
        for( int i = 0; i < 100; i++ )
        {
            WikiPage page = m_engine.getPage( "TestPage" );
            String pagedata = m_engine.getPureText( page );
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.