org.jgroups.demos
Class ExecutionServiceDemo.SortingTwoByteCallable

java.lang.Object
  extended by org.jgroups.demos.ExecutionServiceDemo.SortingTwoByteCallable
All Implemented Interfaces:
java.util.concurrent.Callable<ExecutionServiceDemo.ByteBufferStreamable>, Streamable
Enclosing class:
ExecutionServiceDemo

public static class ExecutionServiceDemo.SortingTwoByteCallable
extends java.lang.Object
implements java.util.concurrent.Callable<ExecutionServiceDemo.ByteBufferStreamable>, Streamable

Sorts 2 byte arrys into a larger byte array

Author:
wburns

Field Summary
protected  java.nio.ByteBuffer bytes1
           
protected  java.nio.ByteBuffer bytes2
           
 
Constructor Summary
ExecutionServiceDemo.SortingTwoByteCallable()
           
ExecutionServiceDemo.SortingTwoByteCallable(ExecutionServiceDemo.ByteBufferStreamable bytes1, ExecutionServiceDemo.ByteBufferStreamable bytes2)
           
 
Method Summary
 ExecutionServiceDemo.ByteBufferStreamable call()
           
 void readFrom(java.io.DataInput in)
          Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
 void writeTo(java.io.DataOutput out)
          Write the entire state of the current object (including superclasses) to outstream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bytes1

protected java.nio.ByteBuffer bytes1

bytes2

protected java.nio.ByteBuffer bytes2
Constructor Detail

ExecutionServiceDemo.SortingTwoByteCallable

public ExecutionServiceDemo.SortingTwoByteCallable()

ExecutionServiceDemo.SortingTwoByteCallable

public ExecutionServiceDemo.SortingTwoByteCallable(ExecutionServiceDemo.ByteBufferStreamable bytes1,
                                                   ExecutionServiceDemo.ByteBufferStreamable bytes2)
Method Detail

call

public ExecutionServiceDemo.ByteBufferStreamable call()
                                               throws java.lang.Exception
Specified by:
call in interface java.util.concurrent.Callable<ExecutionServiceDemo.ByteBufferStreamable>
Throws:
java.lang.Exception

writeTo

public void writeTo(java.io.DataOutput out)
             throws java.lang.Exception
Description copied from interface: Streamable
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed

Specified by:
writeTo in interface Streamable
Throws:
java.lang.Exception

readFrom

public void readFrom(java.io.DataInput in)
              throws java.lang.Exception
Description copied from interface: Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed

Specified by:
readFrom in interface Streamable
Throws:
java.lang.Exception


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.