Examples of MemcacheServer


Examples of org.platformlayer.service.memcache.model.MemcacheServer

  public void handler() throws OpsException, IOException {
  }

  @Override
  protected void addChildren() throws OpsException {
    MemcacheServer model = OpsContext.get().getInstance(MemcacheServer.class);

    InstanceBuilder instance = InstanceBuilder.build(model.dnsName, this, model.getTags());

    // TODO: Memory _really_ needs to be configurable here!
    instance.publicPorts.add(MEMCACHE_PORT);

    instance.minimumMemoryMb = 1024;

    instance.hostPolicy.allowRunInContainer = true;
    addChild(instance);

    instance.addChild(PackageDependency.build("memcached"));

    MemcacheTemplateModel template = injected(MemcacheTemplateModel.class);

    instance.addChild(TemplatedFile.build(template, new File("/etc/memcached.conf")));

    // Collectd not restarting correctly (doesn't appear to be hostname problems??)
    // instance.addChild(CollectdCollector.build());

    {
      PublicEndpoint endpoint = injected(PublicEndpoint.class);
      // endpoint.network = null;
      endpoint.publicPort = MEMCACHE_PORT;
      endpoint.backendPort = MEMCACHE_PORT;
      endpoint.dnsName = model.dnsName;

      endpoint.tagItem = model.getKey();
      endpoint.parentItem = model.getKey();

      instance.addChild(endpoint);
    }

    instance.addChild(ManagedService.build("memcached"));
View Full Code Here

Examples of org.platformlayer.service.memcache.model.MemcacheServer

  @Test
  public void testCreateAndDeleteItem() throws Exception {
    String id = random.randomAlphanumericString(8);

    MemcacheServer memcache = new MemcacheServer();
    memcache.dnsName = id + ".test.platformlayer.org";

    memcache = putItem(id, memcache);
    memcache = waitForHealthy(memcache);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.