mirror of https://github.com/apache/activemq.git
might as well use the generic stuff - sigh
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@492994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
720a19c5bf
commit
d2bff5d8ed
|
@ -28,16 +28,15 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||||
* Marshall an AtomicInteger
|
* Marshall an AtomicInteger
|
||||||
* @version $Revision: 1.10 $
|
* @version $Revision: 1.10 $
|
||||||
*/
|
*/
|
||||||
public class AtomicIntegerMarshaller implements Marshaller{
|
public class AtomicIntegerMarshaller implements Marshaller<AtomicInteger>{
|
||||||
|
|
||||||
|
|
||||||
public void writePayload(Object object,DataOutput dataOut) throws IOException{
|
public void writePayload(AtomicInteger ai,DataOutput dataOut) throws IOException{
|
||||||
AtomicInteger ai = (AtomicInteger) object;
|
|
||||||
dataOut.writeInt(ai.get());
|
dataOut.writeInt(ai.get());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object readPayload(DataInput dataIn) throws IOException{
|
public AtomicInteger readPayload(DataInput dataIn) throws IOException{
|
||||||
int value = dataIn.readInt();
|
int value = dataIn.readInt();
|
||||||
return new AtomicInteger(value);
|
return new AtomicInteger(value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue