Package org.apache.maven.archiva.scheduled.tasks

Examples of org.apache.maven.archiva.scheduled.tasks.DatabaseTask


        List unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
        assertNotNull( "Unprocessed Results should not be null.", unprocessedResultList );
        assertEquals( "Incorrect number of unprocessed artifacts detected.", 1, unprocessedResultList.size() );

        // Execute the database task.
        DatabaseTask dataTask = new DatabaseTask();

        dataTask.setName( "testDataTask" );

        taskExecutor.executeTask( dataTask );
       
        // Test for artifact existance.
        artifactList = adao.queryArtifacts( null );
View Full Code Here


    }

    public void executeTask( Task task )
        throws TaskExecutionException
    {
        DatabaseTask dbtask = (DatabaseTask) task;

        getLogger().info( "Executing task from queue with job name: " + dbtask.getName() );
        long time = System.currentTimeMillis();

        try
        {
            getLogger().info( "Task: Updating unprocessed artifacts" );
View Full Code Here

        return SUCCESS;
    }

    public String updateDatabase()
    {
        DatabaseTask task = new DatabaseTask();
        task.setName( DefaultArchivaTaskScheduler.DATABASE_JOB + ":user-requested" );
        task.setQueuePolicy( ArchivaTask.QUEUE_POLICY_WAIT );

        boolean scheduleTask = false;

        try
        {
View Full Code Here

    }

    public String updateDatabase()
    {
        log.info( "Queueing database task on request from user interface" );
        DatabaseTask task = new DatabaseTask();

        if ( taskScheduler.isProcessingDatabaseTask() )
        {
            addActionError( "Database task was already queued." );
        }
View Full Code Here

/* Tests for db scanning  */
   
    public void testExecuteDbScannerDbNotBeingScanned()
        throws Exception
    {
        DatabaseTask task = new DatabaseTask();
       
        taskSchedulerControl.expectAndReturn( taskScheduler.isProcessingDatabaseTask(), false );
               
        taskScheduler.queueDatabaseTask( task );
        taskSchedulerControl.setMatcher( MockControl.ALWAYS_MATCHER );
View Full Code Here

        {
            return false;
        }

        log.info( "Queueing database task on request from administration service" );
        DatabaseTask task = new DatabaseTask();
       
        taskScheduler.queueDatabaseTask( task );          
       
        return new Boolean( true );
    }
View Full Code Here

        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
        assertNotNull( "Unprocessed Results should not be null.", unprocessedResultList );
        assertEquals( "Incorrect number of unprocessed artifacts detected.", 1, unprocessedResultList.size() );

        // Execute the database task.
        DatabaseTask dataTask = new DatabaseTask();
        taskExecutor.executeTask( dataTask );
       
        // Test for artifact existance.
        artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
View Full Code Here

    }

    public void executeTask( Task task )
        throws TaskExecutionException
    {
        DatabaseTask dbtask = (DatabaseTask) task;

        log.info( "Executing task from queue with job name: " + dbtask );
        long time = System.currentTimeMillis();

        try
View Full Code Here

        JobDataMap dataMap = context.getJobDetail().getJobDataMap();
        setJobDataMap( dataMap );

        TaskQueue taskQueue = (TaskQueue) dataMap.get( DefaultArchivaTaskScheduler.TASK_QUEUE );

        Task task = new DatabaseTask();

        try
        {
            // The database job only needs to run one at a time
            if ( taskQueue.getQueueSnapshot().isEmpty() )
View Full Code Here

    }

    public void executeTask( Task task )
        throws TaskExecutionException
    {
        DatabaseTask dbtask = (DatabaseTask) task;

        log.info( "Executing task from queue with job name: " + dbtask.getName() );
        long time = System.currentTimeMillis();

        try
        {
            log.info( "Task: Updating unprocessed artifacts" );
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.scheduled.tasks.DatabaseTask

Copyright © 2018 www.massapicom. 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.