Package org.apache.stratos.cloud.controller.pojo

Examples of org.apache.stratos.cloud.controller.pojo.MemberContext


      public MemberAdder(FasterLookUpDataHolder data) {
        this.dataHolder = data;
      }
      @Override
      public void run() {
        MemberContext ctxt1 = new MemberContext();
        ctxt1.setMemberId("abc");
        ctxt1.setClusterId("123");
        MemberContext ctxt2 = new MemberContext();
        ctxt2.setMemberId("def");
        ctxt2.setClusterId("456");
        MemberContext ctxt3 = new MemberContext();
        ctxt3.setMemberId("ghi");
        ctxt3.setClusterId("123");
        dataHolder.addMemberContext(ctxt1);
        dataHolder.addMemberContext(ctxt2);
        dataHolder.addMemberContext(ctxt3);
      }
View Full Code Here


        try {
            cartridgeInfo = new CloudControllerServiceImpl().getCartridgeInfo(serviceName);
        } catch (UnregisteredCartridgeException e) {
            log.error("error while getting the cartridge information when publishing the state changes... ");
        } finally {
            MemberContext memberContext = FasterLookUpDataHolder.getInstance().getMemberContextOfMemberId(memberId);
            //Construct the data to be published
            List<Object> payload = new ArrayList<Object>();
            // Payload values
            payload.add(memberId);
            payload.add(serviceName);
            payload.add(clusterId);
            payload.add(memberContext.getLbClusterId());
            payload.add(partitionId);
            payload.add(networkId);
            if(cartridgeInfo != null) {
                payload.add(String.valueOf(cartridgeInfo.isMultiTenant()));
            } else {
                payload.add("");
            }
            payload.add(memberContext.getPartition().getProvider());
            payload.add(status);

            if(metadata != null) {
                payload.add(metadata.getHostname());
                payload.add(metadata.getHardware().getHypervisor());
                payload.add(String.valueOf(metadata.getHardware().getRam()));
                payload.add(metadata.getImageId());
                payload.add(metadata.getLoginPort());
                payload.add(metadata.getOperatingSystem().getName());
                payload.add(metadata.getOperatingSystem().getVersion());
                payload.add(metadata.getOperatingSystem().getArch());
                payload.add(String.valueOf(metadata.getOperatingSystem().is64Bit()));
            } else {
                payload.add("");
                payload.add("");
                payload.add("");
                payload.add("");
                payload.add(0);
                payload.add("");
                payload.add("");
                payload.add("");
                payload.add("");
            }

            payload.add(memberContext.getPrivateIpAddress());
            payload.add(memberContext.getPublicIpAddress());
            payload.add(memberContext.getAllocatedIpAddress());

            Event event = new Event();
            event.setPayloadData(payload.toArray());
            event.setArbitraryDataMap(new HashMap<String, String>());
View Full Code Here

TOP

Related Classes of org.apache.stratos.cloud.controller.pojo.MemberContext

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.