protected List<Attribute> createAttributesToDeRegister(PriamInstance instance) { List<Attribute> attrs = new ArrayList<>(); attrs.add(new Attribute(Attributes.INSTANCE_ID, instance.getInstanceId())); attrs.add(new Attribute(Attributes.TOKEN, instance.getToken())); attrs.add(new Attribute(Attributes.APP_ID, instance.getApp())); attrs.add(new Attribute(Attributes.ID, Integer.toString(instance.getId()))); attrs.add(new Attribute(Attributes.AVAILABILITY_ZONE, instance.getRac())); attrs.add(new Attribute(Attributes.ELASTIC_IP, instance.getHostIP())); attrs.add(new Attribute(Attributes.HOSTNAME, instance.getHostName())); attrs.add(new Attribute(Attributes.LOCATION, instance.getDC())); attrs.add(new Attribute(Attributes.UPDATE_TS, Long.toString(instance.getUpdatetime()))); return attrs; }
public Attribute unmarshall(StaxUnmarshallerContext context) throws Exception { Attribute attribute = new Attribute(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1;
public Attribute unmarshall(StaxUnmarshallerContext context) throws Exception { Attribute attribute = new Attribute(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1;
@Override public void deleteExpectedState(UUID slotId) { Preconditions.checkNotNull(slotId, "id is null"); if (isDomainCreated()) { List<Attribute> attributes = newArrayList(); attributes.add(new Attribute("state", null)); attributes.add(new Attribute("binary", null)); attributes.add(new Attribute("config", null)); try { simpleDb.deleteAttributes(new DeleteAttributesRequest().withDomainName(domainName).withItemName(slotId.toString()).withAttributes(attributes)); expectedStateStoreUp(); } catch (Exception e) { expectedStateStoreDown(e); } } }
@Override public void deleteExpectedState(UUID slotId) { Preconditions.checkNotNull(slotId, "id is null"); if (isDomainCreated()) { List<Attribute> attributes = newArrayList(); attributes.add(new Attribute("state", null)); attributes.add(new Attribute("binary", null)); attributes.add(new Attribute("config", null)); try { simpleDb.deleteAttributes(new DeleteAttributesRequest().withDomainName(domainName).withItemName(slotId.toString()).withAttributes(attributes)); expectedStateStoreUp(); } catch (Exception e) { expectedStateStoreDown(e); } } }
public Attribute unmarshall(StaxUnmarshallerContext context) throws Exception { Attribute attribute = new Attribute(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1;