Search in sources :

Example 86 with PlatformLayerKey

use of org.platformlayer.core.model.PlatformLayerKey in project platformlayer by platformlayer.

the class SolrTemplateData method getCluster.

public SolrCluster getCluster() throws OpsException {
    if (cluster == null) {
        cluster = OpsContext.get().getInstance(SolrCluster.class);
        if (cluster == null) {
            SolrServer server = getServer();
            PlatformLayerKey parent = Tag.PARENT.findUnique(server);
            if (parent != null) {
                cluster = platformLayer.getItem(parent, SolrCluster.class);
            }
        }
    }
    return cluster;
}
Also used : PlatformLayerKey(org.platformlayer.core.model.PlatformLayerKey) SolrServer(org.platformlayer.service.solr.model.SolrServer) SolrCluster(org.platformlayer.service.solr.model.SolrCluster)

Aggregations

PlatformLayerKey (org.platformlayer.core.model.PlatformLayerKey)86 PlatformLayerClient (org.platformlayer.PlatformLayerClient)21 OpsException (org.platformlayer.ops.OpsException)16 ItemBase (org.platformlayer.core.model.ItemBase)14 ManagedItemId (org.platformlayer.ids.ManagedItemId)13 UntypedItem (org.platformlayer.common.UntypedItem)10 ProjectId (org.platformlayer.ids.ProjectId)10 Tag (org.platformlayer.core.model.Tag)8 RepositoryException (org.platformlayer.RepositoryException)7 ServiceType (org.platformlayer.ids.ServiceType)7 JobData (org.platformlayer.jobs.model.JobData)7 InstanceBase (org.platformlayer.core.model.InstanceBase)6 ItemType (org.platformlayer.ids.ItemType)6 OpsTarget (org.platformlayer.ops.OpsTarget)6 JaxbHelper (org.platformlayer.xml.JaxbHelper)6 Handler (org.platformlayer.ops.Handler)5 TypedPlatformLayerClient (org.platformlayer.TypedPlatformLayerClient)4 UntypedItemXml (org.platformlayer.UntypedItemXml)4 FederationKey (org.platformlayer.ids.FederationKey)4 Machine (org.platformlayer.ops.Machine)4