Package io.fathom.cloud.state.StateStore

Examples of io.fathom.cloud.state.StateStore.StateNode


import javax.inject.Singleton;

@Singleton
public class DnsRepository extends RepositoryBase {
    public NamedItemCollection<DnsSuffixData> getDnsSuffixes() {
        StateNode node = stateStore.getRoot("dnssuffix");
        return NamedItemCollection.builder(node, DnsSuffixData.class).idField(DnsSuffixData.KEY_FIELD_NUMBER).create();
    }
View Full Code Here


        StateNode node = stateStore.getRoot("dnssuffix");
        return NamedItemCollection.builder(node, DnsSuffixData.class).idField(DnsSuffixData.KEY_FIELD_NUMBER).create();
    }

    public NamedItemCollection<DnsSuffixData> getSharedSubdomains(String key) {
        StateNode subdomains = stateStore.getRoot("dnssubdomains");
        StateNode node = subdomains.child(key);

        return NamedItemCollection.builder(node, DnsSuffixData.class).idField(DnsSuffixData.KEY_FIELD_NUMBER).create();
    }
View Full Code Here

        return NamedItemCollection.builder(node, DnsSuffixData.class).idField(DnsSuffixData.KEY_FIELD_NUMBER).create();
    }

    public NumberedItemCollection<DnsZoneData> getDnsZones(long projectId) {
        StateNode dnsNode = stateStore.getRoot("dnsdomain");
        StateNode projectNode = dnsNode.child(Long.toHexString(projectId));
        return NumberedItemCollection.builder(projectNode, DnsZoneData.class).idField(DnsZoneData.ID_FIELD_NUMBER)
                .keyField(DnsZoneData.NAME_FIELD_NUMBER).create();
    }
View Full Code Here

        return NumberedItemCollection.builder(projectNode, DnsZoneData.class).idField(DnsZoneData.ID_FIELD_NUMBER)
                .keyField(DnsZoneData.NAME_FIELD_NUMBER).create();
    }

    public NumberedItemCollection<DnsRecordsetData> getDnsRecordsets(long projectId, long zoneId) {
        StateNode dnsNode = stateStore.getRoot("dnsrecord");
        StateNode projectNode = dnsNode.child(Long.toHexString(projectId));
        StateNode domainNode = projectNode.child(Long.toHexString(zoneId));

        return NumberedItemCollection.builder(domainNode, DnsRecordsetData.class)
                .idField(DnsRecordsetData.ID_FIELD_NUMBER).create();
    }
View Full Code Here

        return NumberedItemCollection.builder(domainNode, DnsRecordsetData.class)
                .idField(DnsRecordsetData.ID_FIELD_NUMBER).create();
    }

    public NamedItemCollection<BackendData> getBackends() {
        StateNode node = stateStore.getRoot("dnsbackends");

        return NamedItemCollection.builder(node, BackendData.class).idField(BackendData.KEY_FIELD_NUMBER).create();
    }
View Full Code Here

import javax.inject.Singleton;

@Singleton
public class ClusterRepository extends RepositoryBase {
    public NamedItemCollection<NodeData> getNodes() {
        StateNode root = stateStore.getRoot("nodes");

        return new NamedItemCollection<NodeData>(root, NodeData.newBuilder(), NodeData.getDescriptor()
                .findFieldByNumber(NodeData.KEY_FIELD_NUMBER));
    }
View Full Code Here

@Singleton
public class SecretRepository extends RepositoryBase {

    public NumberedItemCollection<SecretRecordData> getSecrets(Project project) {
        StateNode secretNode = stateStore.getRoot("secrets");
        StateNode projectNode = secretNode.child(Long.toHexString(project.getId()));

        return new NumberedItemCollection<SecretRecordData>(projectNode, SecretRecordData.newBuilder(),
                SecretRecordData.getDescriptor().findFieldByNumber(SecretRecordData.ID_FIELD_NUMBER));
    }
View Full Code Here

import javax.inject.Singleton;

@Singleton
public class LbaasRepository extends RepositoryBase {
    public NumberedItemCollection<LbaasMappingData> getMappings(Project project) {
        StateNode node = stateStore.getRoot("lb_map");
        node = node.child(Long.toHexString(project.getId()));
        return NumberedItemCollection.builder(node, LbaasMappingData.class).idField(LbaasMappingData.ID_FIELD_NUMBER)
                .create();
    }
View Full Code Here

        return NumberedItemCollection.builder(node, LbaasMappingData.class).idField(LbaasMappingData.ID_FIELD_NUMBER)
                .create();
    }

    public NumberedItemCollection<LbaasServerData> getServers(Project project) {
        StateNode node = stateStore.getRoot("lb_server");
        node = node.child(Long.toHexString(project.getId()));
        return NumberedItemCollection.builder(node, LbaasServerData.class).idField(LbaasServerData.ID_FIELD_NUMBER)
                .create();
    }
View Full Code Here

import javax.inject.Singleton;

@Singleton
public class FileStore extends RepositoryBase {
    public NamedItemCollection<BucketData> getBuckets(long projectId) {
        StateNode root = stateStore.getRoot("bucket");
        StateNode node = root.child(Long.toHexString(projectId));

        return new NamedItemCollection<BucketData>(node, BucketData.newBuilder(), BucketData.getDescriptor()
                .findFieldByNumber(BucketData.KEY_FIELD_NUMBER));
    }
View Full Code Here

TOP

Related Classes of io.fathom.cloud.state.StateStore.StateNode

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.