All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.swarm.config.Io Maven / Gradle / Ivy

package org.wildfly.swarm.config;

import org.wildfly.config.runtime.Implicit;
import org.wildfly.config.runtime.ResourceType;
import org.wildfly.config.runtime.ModelNodeBinding;
import java.util.List;
import org.wildfly.config.runtime.Subresource;
import org.wildfly.swarm.config.io.Worker;
import org.wildfly.swarm.config.io.BufferPool;
/**
 * IO subsystem
 */
@ResourceType("subsystem")
@Implicit
public class Io {

	private String key;
	private IoResources subresources = new IoResources();

	public Io() {
		this.key = "io";
	}

	public String getKey() {
		return this.key;
	}

	public IoResources subresources() {
		return this.subresources;
	}

	/**
	 * Add all org.wildfly.swarm.config.io.Worker objects to this subresource
	 * @return this
	 * @param value List of org.wildfly.swarm.config.io.Worker objects.
	 */
	@SuppressWarnings("unchecked")
	public T workers(List value) {
		this.subresources.workers.addAll(value);
		return (T) this;
	}

	/**
	 * Add the org.wildfly.swarm.config.io.Worker object to the list of subresources
	 * @param value The org.wildfly.swarm.config.io.Worker to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T worker(Worker value) {
		this.subresources.workers.add(value);
		return (T) this;
	}

	/**
	 * Add all org.wildfly.swarm.config.io.BufferPool objects to this subresource
	 * @return this
	 * @param value List of org.wildfly.swarm.config.io.BufferPool objects.
	 */
	@SuppressWarnings("unchecked")
	public T bufferPools(List value) {
		this.subresources.bufferPools.addAll(value);
		return (T) this;
	}

	/**
	 * Add the org.wildfly.swarm.config.io.BufferPool object to the list of subresources
	 * @param value The org.wildfly.swarm.config.io.BufferPool to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public T bufferPool(BufferPool value) {
		this.subresources.bufferPools.add(value);
		return (T) this;
	}

	/**
	 * Child mutators for Io
	 */
	public class IoResources {
		/**
		 * Defines workers
		 */
		private List workers = new java.util.ArrayList<>();
		/**
		 * Defines buffer pool
		 */
		private List bufferPools = new java.util.ArrayList<>();

		/**
		 * Get the list of org.wildfly.swarm.config.io.Worker resources
		 * @return the list of resources
		 */
		@Subresource
		public List workers() {
			return this.workers;
		}

		/**
		 * Get the list of org.wildfly.swarm.config.io.BufferPool resources
		 * @return the list of resources
		 */
		@Subresource
		public List bufferPools() {
			return this.bufferPools;
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy