/** * Create and configure a Server object to the list of subresources * * @param key * The key for the Server resource * @return this */ @SuppressWarnings("unchecked") public T server(java.lang.String childKey) { server(childKey, null); return (T) this; }
public IOFraction applyDefaults() { return worker(new Worker("default")) .bufferPool(new BufferPool("default")); } }
/** * Create and configure a Worker object to the list of subresources * * @param key * The key for the Worker resource * @param config * The WorkerConsumer to use * @return this */ @SuppressWarnings("unchecked") public T worker(java.lang.String childKey, WorkerConsumer consumer) { Worker<? extends Worker> child = new Worker<>(childKey); if (consumer != null) { consumer.accept(child); } worker(child); return (T) this; }
/** * Create and configure a BufferPool object to the list of subresources * * @param key * The key for the BufferPool resource * @param config * The BufferPoolConsumer to use * @return this */ @SuppressWarnings("unchecked") public T bufferPool(java.lang.String childKey, BufferPoolConsumer consumer) { BufferPool<? extends BufferPool> child = new BufferPool<>(childKey); if (consumer != null) { consumer.accept(child); } bufferPool(child); return (T) this; }
/** * Install a supplied OutboundBindAddress object to the list of subresources */ @SuppressWarnings("unchecked") public T outboundBindAddress(OutboundBindAddressSupplier supplier) { outboundBindAddress(supplier.get()); return (T) this; }
/** * Create and configure a OutboundBindAddress object to the list of * subresources * * @param key * The key for the OutboundBindAddress resource * @return this */ @SuppressWarnings("unchecked") public T outboundBindAddress(java.lang.String childKey) { outboundBindAddress(childKey, null); return (T) this; }
/** * Install a supplied BufferPool object to the list of subresources */ @SuppressWarnings("unchecked") public T bufferPool(BufferPoolSupplier supplier) { bufferPool(supplier.get()); return (T) this; }
/** * Install a supplied Worker object to the list of subresources */ @SuppressWarnings("unchecked") public T worker(WorkerSupplier supplier) { worker(supplier.get()); return (T) this; }
public IOFraction applyDefaults() { return worker(new Worker("default")) .bufferPool(new BufferPool("default")); } }
/** * Create and configure a Server object to the list of subresources * * @param key * The key for the Server resource * @return this */ @SuppressWarnings("unchecked") public T server(java.lang.String childKey) { server(childKey, null); return (T) this; }
/** * Create and configure a OutboundBindAddress object to the list of * subresources * * @param key * The key for the OutboundBindAddress resource * @return this */ @SuppressWarnings("unchecked") public T outboundBindAddress(java.lang.String childKey) { outboundBindAddress(childKey, null); return (T) this; }
/** * Install a supplied BufferPool object to the list of subresources */ @SuppressWarnings("unchecked") public T bufferPool(BufferPoolSupplier supplier) { bufferPool(supplier.get()); return (T) this; }
public static IOFraction createDefaultFraction() { return new IOFraction().worker(new Worker("default")) .bufferPool(new BufferPool("default")); } }
public static IOFraction createDefaultFraction() { return new IOFraction().worker(new Worker("default")) .bufferPool(new BufferPool("default")); } }