@Override public String apply(HostRegistration h) { return h.getBaseUrl(); } };
@Override public boolean equals(Object obj) { if (!(obj instanceof HostRegistration)) return false; HostRegistration registration = (HostRegistration) obj; return baseUrl.equals(registration.getBaseUrl()); }
/** * {@inheritDoc} * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (!(obj instanceof HostRegistration)) return false; HostRegistration registration = (HostRegistration) obj; return baseUrl.equals(registration.getBaseUrl()); }
@Override public Boolean apply(HostRegistration host, Long jobId) { if (dispatchPriorityList.values().contains(host.getBaseUrl()) && !host.getBaseUrl().equals(dispatchPriorityList.get(jobId))) { return false; } return true; } };
if (!systemLoad.containsHost(h.getBaseUrl())) { systemLoad.addNodeLoad(new NodeLoad(h.getBaseUrl(), 0.0f));
/** * {@inheritDoc} * * @see org.opencastproject.serviceregistry.api.ServiceRegistry#getMaxLoads() */ @Override public SystemLoad getMaxLoads() throws ServiceRegistryException { final SystemLoad loads = new SystemLoad(); for (HostRegistration host : getHostRegistrations()) { NodeLoad load = new NodeLoad(host.getBaseUrl(), host.getMaxLoad()); loads.addNodeLoad(load); } return loads; }
if (host.getBaseUrl().equals(service.getHost())) { hostLoadMax = host.getMaxLoad(); break;
/** * Creates a new JAXB host registration based on an existing host registration * * @param hostRegistration */ public JaxbHostRegistration(HostRegistration hostRegistration) { this.baseUrl = hostRegistration.getBaseUrl(); this.address = hostRegistration.getIpAddress(); this.memory = hostRegistration.getMemory(); this.cores = hostRegistration.getCores(); this.maxLoad = hostRegistration.getMaxLoad(); this.online = hostRegistration.isOnline(); this.active = hostRegistration.isActive(); this.maintenanceMode = hostRegistration.isMaintenanceMode(); }