this.writeOptional(writer, Attribute.MACHINE, transport, ModelKeys.MACHINE);
writer.writeEndElement();
}
for (ModelNode cache: container.get(ModelKeys.CACHE).asList()) {
CacheMode mode = CacheMode.valueOf(cache.get(ModelKeys.MODE).asString());
if (mode.isClustered()) {
if (mode.isDistributed()) {
writer.writeStartElement(Element.DISTRIBUTED_CACHE.getLocalName());
this.writeOptional(writer, Attribute.OWNERS, cache, ModelKeys.OWNERS);
this.writeOptional(writer, Attribute.VIRTUAL_NODES, cache, ModelKeys.VIRTUAL_NODES);
this.writeOptional(writer, Attribute.L1_LIFESPAN, cache, ModelKeys.L1_LIFESPAN);
} else if (mode.isInvalidation()) {
writer.writeStartElement(Element.INVALIDATION_CACHE.getLocalName());
} else {
writer.writeStartElement(Element.REPLICATED_CACHE.getLocalName());
}
writer.writeAttribute(Attribute.MODE.getLocalName(), Mode.forCacheMode(mode).name());