org.apache.archiva.rest.services
Class DefaultSystemStatusService

java.lang.Object
  extended by org.apache.archiva.rest.services.AbstractRestService
      extended by org.apache.archiva.rest.services.DefaultSystemStatusService
All Implemented Interfaces:
SystemStatusService

@Service(value="systemStatusService#rest")
public class DefaultSystemStatusService
extends AbstractRestService
implements SystemStatusService

Since:
1.4-M3
Author:
Olivier Lamy

Field Summary
private  Map<String,org.apache.archiva.redback.components.cache.Cache> caches
           
private  Map<String,org.apache.archiva.redback.components.taskqueue.TaskQueue> queues
           
private  RepositoryScanner scanner
           
 
Fields inherited from class org.apache.archiva.rest.services.AbstractRestService
archivaAdministration, config, httpServletRequest, log, managedRepositoryAdmin, repositoryContentFactory, repositorySessionFactory, repositoryTaskScheduler, userRepositories
 
Constructor Summary
DefaultSystemStatusService(org.springframework.context.ApplicationContext applicationContext, RepositoryScanner scanner)
           
 
Method Summary
 Boolean clearAllCaches()
           
 Boolean clearCache(String cacheKey)
           
private static String formatMemory(long l)
           
 List<CacheEntry> getCacheEntries()
           
 String getCurrentServerTime(String locale)
           
 String getMemoryStatus()
           
 List<QueueEntry> getQueueEntries()
           
 List<RepositoryScannerStatistics> getRepositoryScannerStatistics()
           
private  List<ConsumerScanningStatistics> mapConsumerScanningStatistics(RepositoryScannerInstance instance)
           
 
Methods inherited from class org.apache.archiva.rest.services.AbstractRestService
buildArtifacts, doScanRepository, getArtifactUrl, getAuditInformation, getAuditListeners, getBaseUrl, getBeansOfType, getObservableRepos, getPrincipal, setAuditListeners, triggerAuditEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queues

private Map<String,org.apache.archiva.redback.components.taskqueue.TaskQueue> queues

caches

private Map<String,org.apache.archiva.redback.components.cache.Cache> caches

scanner

private RepositoryScanner scanner
Constructor Detail

DefaultSystemStatusService

@Inject
public DefaultSystemStatusService(org.springframework.context.ApplicationContext applicationContext,
                                         RepositoryScanner scanner)
Method Detail

getMemoryStatus

public String getMemoryStatus()
                       throws ArchivaRestServiceException
Specified by:
getMemoryStatus in interface SystemStatusService
Throws:
ArchivaRestServiceException

formatMemory

private static String formatMemory(long l)

getCurrentServerTime

public String getCurrentServerTime(String locale)
                            throws ArchivaRestServiceException
Specified by:
getCurrentServerTime in interface SystemStatusService
Throws:
ArchivaRestServiceException

getQueueEntries

public List<QueueEntry> getQueueEntries()
                                 throws ArchivaRestServiceException
Specified by:
getQueueEntries in interface SystemStatusService
Throws:
ArchivaRestServiceException

getCacheEntries

public List<CacheEntry> getCacheEntries()
                                 throws ArchivaRestServiceException
Specified by:
getCacheEntries in interface SystemStatusService
Throws:
ArchivaRestServiceException

clearCache

public Boolean clearCache(String cacheKey)
                   throws ArchivaRestServiceException
Specified by:
clearCache in interface SystemStatusService
Throws:
ArchivaRestServiceException

clearAllCaches

public Boolean clearAllCaches()
                       throws ArchivaRestServiceException
Specified by:
clearAllCaches in interface SystemStatusService
Throws:
ArchivaRestServiceException

getRepositoryScannerStatistics

public List<RepositoryScannerStatistics> getRepositoryScannerStatistics()
                                                                 throws ArchivaRestServiceException
Specified by:
getRepositoryScannerStatistics in interface SystemStatusService
Throws:
ArchivaRestServiceException

mapConsumerScanningStatistics

private List<ConsumerScanningStatistics> mapConsumerScanningStatistics(RepositoryScannerInstance instance)


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.