Package org.apache.commons.lang.time

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


        finally
        {
            repositorySession.close();
        }

        stopWatch.stop();
        log.info( "Time to initalize DefaultRepositoryArchivaTaskScheduler: {} ms", stopWatch.getTime() );
    }


    @PreDestroy
View Full Code Here


            IndexUpdateRequest request = new IndexUpdateRequest( indexingContext, resourceFetcher );
            request.setForceFullUpdate( this.fullDownload );
            request.setLocalIndexCacheDir( indexCacheDirectory );

            this.indexUpdater.fetchAndUpdateIndex( request );
            stopWatch.stop();
            log.info( "time update index from remote for repository {}: {} s", this.remoteRepository.getId(),
                      ( stopWatch.getTime() / 1000 ) );

            // index packing optionnal ??
            //IndexPackingRequest indexPackingRequest =
View Full Code Here

            throw new ArchivaException( "Unable to initialize Redback Security Environment, [" + violations.size()
                                            + "] violation(s) encountered, See log for details." );
        }

        stopWatch.stop();
        log.info( "time to execute all EnvironmentCheck: {} ms", stopWatch.getTime() );
    }


    private void assignRepositoryObserverToGuestUser( List<ManagedRepositoryConfiguration> repos )
View Full Code Here

        {
            String name = scans.get( scans.size() - 1 );
            RepositoryStatistics repositoryStatistics =
                RepositoryStatistics.class.cast( metadataRepository.getMetadataFacet( repositoryId, RepositoryStatistics.FACET_ID,
                                                                            name ));
            stopWatch.stop();
            log.debug( "time to find last RepositoryStatistics: {} ms", stopWatch.getTime() );
            return repositoryStatistics;
        }
        else
        {
View Full Code Here

            {
                metadataRepository.close();
            }
        }

        stopWatch.stop();
        logger.info( "time to initialize JcrRepositorySessionFactory: {}", stopWatch.getTime() );
    }
}
View Full Code Here

        mc.setUri(exportUrl);
        MediaSource ms = service.getMedia(mc);

        InputStream inStream = ms.getInputStream();

        watch.stop();
        logger.info("Got content stream in " + watch.getTime() + " ms");

        return inStream;
    }
View Full Code Here

            out.flush();
        } finally {
            IOUtils.closeQuietly(inStream);
        }

        watch.stop();
        logger.info("Downloaded file in " + watch.getTime() + " ms");
    }

    /**
     * Exports the content of the specified document to a file.
View Full Code Here

            DocumentListEntry newEntry = new FolderEntry();
            newEntry.setTitle(new PlainTextConstruct(defaultTargetFolderName));
            folder = service.insert(new URL("https://docs.google.com/feeds/default/private/full/"), newEntry);
        }

        watch.stop();
        logger.info("Getting target folder took " + watch.getTime() + " ms");

        return folder;
    }
View Full Code Here

        newDocument.setFile(file, mimeType);
        newDocument.setTitle(new PlainTextConstruct(file.getName()));

        DocumentListEntry uploadedFile = service.insert(targetFolderUri, newDocument);

        watch.stop();
        logger.info("File " + file + " uploaded in " + watch.getTime() + " ms");

        return uploadedFile;
    }
View Full Code Here

        content.setMimeType(new ContentType(mimeType));
        newDocument.setContent(content);

        DocumentListEntry uploadedFile = service.insert(targetFolderUri, newDocument);

        watch.stop();
        logger.info("File " + documentTitle + " uploaded in " + watch.getTime() + " ms");

        return uploadedFile;
    }
}
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.