Examples of RepositoryScanStatistics


Examples of org.apache.archiva.repository.scanner.RepositoryScanStatistics

                            sinceWhen = previousStats.getScanStartTime().getTime();
                            previousFileCount = previousStats.getTotalFileCount();
                        }
                    }

                    RepositoryScanStatistics stats;
                    try
                    {
                        stats = repoScanner.scan( arepo, sinceWhen );
                    }
                    catch ( RepositoryScannerException e )
                    {
                        throw new TaskExecutionException( "Repository error when executing repository job.", e );
                    }

                    log.info( "Finished first scan: {}", stats.toDump( arepo ) );

                    // further statistics will be populated by the following method
                    Date endTime = new Date( stats.getWhenGathered().getTime() + stats.getDuration() );

                    log.info( "Gathering repository statistics" );

                    repositoryStatisticsManager.addStatisticsAfterScan( metadataRepository, repoId,
                                                                        stats.getWhenGathered(), endTime,
                                                                        stats.getTotalFileCount(),
                                                                        stats.getTotalFileCount() - previousFileCount );
                    repositorySession.save();
                }
                catch ( MetadataRepositoryException e )
                {
                    throw new TaskExecutionException( "Unable to store updated statistics: " + e.getMessage(), e );
View Full Code Here

Examples of org.apache.archiva.repository.scanner.RepositoryScanStatistics

                            sinceWhen = previousStats.getScanStartTime().getTime();
                            previousFileCount = previousStats.getTotalFileCount();
                        }
                    }

                    RepositoryScanStatistics stats;
                    try
                    {
                        stats = repoScanner.scan( arepo, sinceWhen );
                    }
                    catch ( RepositoryScannerException e )
                    {
                        throw new TaskExecutionException( "Repository error when executing repository job.", e );
                    }

                    log.info( "Finished first scan: {}", stats.toDump( arepo ) );

                    // further statistics will be populated by the following method
                    Date endTime = new Date( stats.getWhenGathered().getTime() + stats.getDuration() );

                    log.info( "Gathering repository statistics" );

                    repositoryStatisticsManager.addStatisticsAfterScan( metadataRepository, repoId,
                                                                        stats.getWhenGathered(), endTime,
                                                                        stats.getTotalFileCount(),
                                                                        stats.getTotalFileCount() - previousFileCount );
                    repositorySession.save();
                }
                catch ( MetadataRepositoryException e )
                {
                    throw new TaskExecutionException( "Unable to store updated statistics: " + e.getMessage(), e );
View Full Code Here

Examples of org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics

                    {
                        sinceWhen = lastStats.getWhenGathered().getTime() - lastStats.getDuration();
                    }
                }

                RepositoryScanStatistics stats = repoScanner.scan( arepo, sinceWhen );

                log.info( "Finished repository task: " + stats.toDump( arepo ) );

                RepositoryContentStatistics dbstats = constructRepositoryStatistics( arepo, stats );

                dao.getRepositoryContentStatisticsDAO().saveRepositoryContentStatistics( dbstats );
View Full Code Here

Examples of org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics

                {
                    RepositoryContentStatistics lastStats = results.get( 0 );
                    sinceWhen = lastStats.getWhenGathered().getTime() + lastStats.getDuration();
                }
   
                RepositoryScanStatistics stats = repoScanner.scan( arepo, sinceWhen );
   
                log.info( "Finished repository task: " + stats.toDump( arepo ) );
               
                RepositoryContentStatistics dbstats = constructRepositoryStatistics( arepo, sinceWhen, results, stats );
               
                dao.getRepositoryContentStatisticsDAO().saveRepositoryContentStatistics( dbstats );  
               
View Full Code Here

Examples of org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics

            {
                RepositoryContentStatistics lastStats = results.get( 0 );
                sinceWhen = lastStats.getWhenGathered().getTime() + lastStats.getDuration();
            }

            RepositoryScanStatistics stats = repoScanner.scan( arepo, sinceWhen );

            getLogger().info( "Finished repository task: " + stats.toDump( arepo ) );
           
            // I hate jpox and modello
            RepositoryContentStatistics dbstats = new RepositoryContentStatistics();
            dbstats.setDuration( stats.getDuration() );
            dbstats.setNewFileCount( stats.getNewFileCount() );
            dbstats.setRepositoryId( stats.getRepositoryId() );
            dbstats.setTotalFileCount( stats.getTotalFileCount() );
            dbstats.setWhenGathered( stats.getWhenGathered() );
           
            dao.getRepositoryContentStatisticsDAO().saveRepositoryContentStatistics( dbstats );
        }
        catch ( RepositoryException e )
        {
View Full Code Here

Examples of org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics

        RepositoryScanner scanner = (RepositoryScanner) plexus.lookup( RepositoryScanner.class );

        try
        {
            RepositoryScanStatistics stats = scanner.scan( repo, knownConsumerList, invalidConsumerList,
                                                           ignoredContent, RepositoryScanner.FRESH_SCAN );

            System.out.println( "\n" + stats.toDump( repo ) );
        }
        catch ( RepositoryException e )
        {
            e.printStackTrace( System.err );
        }
View Full Code Here

Examples of org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics

        RepositoryScanner scanner = (RepositoryScanner) lookup( RepositoryScanner.class );

        try
        {
            RepositoryScanStatistics stats = scanner.scan( repo, knownConsumerList, invalidConsumerList, ignoredContent,
                                                           RepositoryScanner.FRESH_SCAN );

            System.out.println( "\n" + stats.toDump( repo ) );
        }
        catch ( RepositoryException e )
        {
            e.printStackTrace( System.err );
        }
View Full Code Here

Examples of org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics

        RepositoryScanner scanner = (RepositoryScanner) lookup( RepositoryScanner.class );

        try
        {
            RepositoryScanStatistics stats =
                scanner.scan( repo, knownConsumerList, invalidConsumerList, ignoredContent,
                              RepositoryScanner.FRESH_SCAN );

            System.out.println( "\n" + stats.toDump( repo ) );
        }
        catch ( RepositoryException e )
        {
            e.printStackTrace( System.err );
        }
View Full Code Here

Examples of org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics

                    {
                        sinceWhen = lastStats.getWhenGathered().getTime() - lastStats.getDuration();
                    }
                }

                RepositoryScanStatistics stats = repoScanner.scan( arepo, sinceWhen );

                log.info( "Finished repository task: " + stats.toDump( arepo ) );

                RepositoryContentStatistics dbstats = constructRepositoryStatistics( arepo, stats );

                dao.getRepositoryContentStatisticsDAO().saveRepositoryContentStatistics( dbstats );
View Full Code Here

Examples of org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics

            {
                RepositoryContentStatistics lastStats = results.get( 0 );
                sinceWhen = lastStats.getWhenGathered().getTime() + lastStats.getDuration();
            }

            RepositoryScanStatistics stats = repoScanner.scan( arepo, sinceWhen );

            log.info( "Finished repository task: " + stats.toDump( arepo ) );
           
            // I hate jpox and modello
            RepositoryContentStatistics dbstats = new RepositoryContentStatistics();
            dbstats.setDuration( stats.getDuration() );
            dbstats.setNewFileCount( stats.getNewFileCount() );
            dbstats.setRepositoryId( stats.getRepositoryId() );
            dbstats.setTotalFileCount( stats.getTotalFileCount() );
            dbstats.setWhenGathered( stats.getWhenGathered() );
           
            dao.getRepositoryContentStatisticsDAO().saveRepositoryContentStatistics( dbstats );
        }
        catch ( RepositoryException e )
        {
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.