1 24 25 package org.objectweb.dream.protocol.utobcast.message; 26 27 import org.objectweb.dream.message.AbstractChunk; 28 import org.objectweb.dream.message.Chunk; 29 import org.objectweb.dream.message.ChunkType; 30 import org.objectweb.dream.protocol.Process; 31 32 35 public class UPDChunkImpl extends AbstractChunk implements UPDChunk 36 { 37 38 protected Process [] processes; 39 40 41 protected long sn = -1; 42 43 49 public void setSequenceNumber(long sn) 50 { 51 this.sn = sn; 52 } 53 54 57 public long getSequenceNumber() 58 { 59 return sn; 60 } 61 62 65 public Process [] getProcesses() 66 { 67 return processes; 68 } 69 70 73 public void setProcesses(Process [] processes) 74 { 75 this.processes = processes; 76 } 77 78 82 85 public ChunkType getType() 86 { 87 return TYPE; 88 } 89 90 93 public void transfertState(Chunk newInstance) 94 { 95 ((UPDChunk) newInstance).setProcesses(getProcesses()); 96 ((UPDChunk) newInstance).setSequenceNumber(getSequenceNumber()); 97 } 98 99 102 public void recycle() 103 { 104 processes = null; 105 sn = -1; 106 } 107 108 } | Popular Tags |