Alachisoft.NCache.Common.DataStructures.BridgeOperationData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nc-common Show documentation
Show all versions of nc-common Show documentation
Internal package of Alachisoft.
package Alachisoft.NCache.Common.DataStructures;
import com.alachisoft.ncache.serialization.core.io.ICompactSerializable;
import com.alachisoft.ncache.serialization.core.io.NCacheObjectInput;
import com.alachisoft.ncache.serialization.core.io.NCacheObjectOutput;
import java.io.IOException;
/**
* Contains bridge operation along with the source cache id from which operation was sent to bridge.
*/
public class BridgeOperationData implements ICompactSerializable {
private BridgeOperation _operation;
private String _srcCacheUniqueID;
public BridgeOperationData() {
}
public BridgeOperationData(BridgeOperation operation, String srcCacheUniqueID) {
_operation = operation;
_srcCacheUniqueID = srcCacheUniqueID;
}
public final BridgeOperation getOperation() {
return _operation;
}
public final String getSrcCacheUniqueID() {
return _srcCacheUniqueID;
}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
///#region ICompactSerializable Members
public final void Deserialize(com.alachisoft.ncache.serialization.standard.io.CompactReader reader) throws IOException, ClassNotFoundException {
_operation = (BridgeOperation) reader.ReadObject();
_srcCacheUniqueID = reader.ReadString();
}
public final void Serialize(com.alachisoft.ncache.serialization.standard.io.CompactWriter writer) throws IOException, ClassNotFoundException {
writer.WriteObject(_operation);
writer.Write(_srcCacheUniqueID);
}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
///#endregion
@Override
public void serialize(NCacheObjectOutput out) throws IOException {
out.writeObject(_operation);
out.writeObject(_srcCacheUniqueID);
}
@Override
public void deserialize(NCacheObjectInput in) throws IOException, ClassNotFoundException {
_operation = (BridgeOperation) in.readObject();
_srcCacheUniqueID = (String) in.readObject();
}
}