Search in sources :

Example 6 with NodeLoad

use of org.opencastproject.serviceregistry.api.SystemLoad.NodeLoad in project opencast by opencast.

the class ServiceRegistryInMemoryImpl method getMaxLoads.

/**
 * {@inheritDoc}
 *
 * @see org.opencastproject.serviceregistry.api.ServiceRegistry#getMaxLoads()
 */
@Override
public SystemLoad getMaxLoads() throws ServiceRegistryException {
    SystemLoad systemLoad = new SystemLoad();
    systemLoad.addNodeLoad(new NodeLoad(LOCALHOST, Runtime.getRuntime().availableProcessors()));
    return systemLoad;
}
Also used : NodeLoad(org.opencastproject.serviceregistry.api.SystemLoad.NodeLoad)

Aggregations

NodeLoad (org.opencastproject.serviceregistry.api.SystemLoad.NodeLoad)6 Query (javax.persistence.Query)2 TypedQuery (javax.persistence.TypedQuery)2 HostRegistration (org.opencastproject.serviceregistry.api.HostRegistration)2 ServiceRegistryException (org.opencastproject.serviceregistry.api.ServiceRegistryException)2 SystemLoad (org.opencastproject.serviceregistry.api.SystemLoad)2 NotFoundException (org.opencastproject.util.NotFoundException)2 URISyntaxException (java.net.URISyntaxException)1 LinkedList (java.util.LinkedList)1 EntityManager (javax.persistence.EntityManager)1 NoResultException (javax.persistence.NoResultException)1 PersistenceException (javax.persistence.PersistenceException)1 RollbackException (javax.persistence.RollbackException)1 HttpStatus (org.apache.http.HttpStatus)1 JaxbJob (org.opencastproject.job.api.JaxbJob)1 Job (org.opencastproject.job.api.Job)1 Status (org.opencastproject.job.api.Job.Status)1 TrustedHttpClientException (org.opencastproject.security.api.TrustedHttpClientException)1 InvalidSyntaxException (org.osgi.framework.InvalidSyntaxException)1 ConfigurationException (org.osgi.service.cm.ConfigurationException)1