Example task that demonstrate usage of Grid Executor Service together with GridGain.
This class encapsulates all image data.
Full Source Code
GridExecutorImage.java
package org.gridgain.examples.executor; import java.io.*; public class GridExecutorImage implements Serializable { /** Image height. */ private int height; /** Image width. */ private int width; /** Image binary data. */ private byte[] data = null; /** * Creates image. * * @param height Image height. * @param width Image width. * @param data Image binary data. */ public GridExecutorImage(int height, int width, byte[] data) { assert data != null; this.height = height; this.width = width; this.data = data; } /** * Gets height. * * @return Image height. */ public int getHeight() { return height; } /** * Gets width. * * @return Image width. */ public int getWidth() { return width; } /** * Gets image binary data. * * @return Image binary data. */ public byte[] getData() { return data; } /** * {@inheritDoc} */ @Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append(getClass().getName()); buf.append(" [height=").append(height); buf.append(", width=").append(width); buf.append(']'); return buf.toString(); } }
