Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff5fef2

Browse filesBrowse files
committed
Rename class names: CloudVar** -> CloudSD**
1 parent 2f0ff66 commit ff5fef2
Copy full SHA for ff5fef2
Expand file treeCollapse file tree

12 files changed

+37
-37
lines changed
Open diff view settings
Collapse file

‎src/lambdacloud/core/CloudFunc.java‎

Copy file name to clipboardExpand all lines: src/lambdacloud/core/CloudFunc.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import lambdacloud.net.CloudFuncHandler;
1818
import lambdacloud.net.CloudQuery;
1919
import lambdacloud.net.CloudResp;
20-
import lambdacloud.net.CloudVarHandler;
20+
import lambdacloud.net.CloudSDHandler;
2121
import lambdacloud.test.CompileUtils;
2222
import symjava.bytecode.BytecodeBatchFunc;
2323
import symjava.bytecode.BytecodeFunc;
@@ -328,7 +328,7 @@ public void apply(CloudSD output, CloudSD ...inputs) {
328328
}
329329

330330
CloudClient client = config.currentClient();
331-
CloudVarHandler handler = client.getCloudVarHandler();
331+
CloudSDHandler handler = client.getCloudVarHandler();
332332
try {
333333
CloudQuery qry = new CloudQuery();
334334
qry.qryType = CloudQuery.CLOUD_FUNC_EVAL;
Collapse file

‎src/lambdacloud/core/CloudLib.java‎

Copy file name to clipboardExpand all lines: src/lambdacloud/core/CloudLib.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import symjava.symbolic.Expr;
55
import lambdacloud.net.CloudClient;
66
import lambdacloud.net.CloudQuery;
7-
import lambdacloud.net.CloudVarHandler;
7+
import lambdacloud.net.CloudSDHandler;
88

99
public class CloudLib {
1010
protected CloudConfig localConfig = null;
@@ -127,7 +127,7 @@ public double[] solverGaussNewton(String eq, double[] init, double[][] data, int
127127

128128
protected void invokeStatic(String className, String methodName, String[] args, CloudSD output) {
129129
CloudClient client = currentCloudConfig().currentClient();
130-
CloudVarHandler handler = client.getCloudVarHandler();
130+
CloudSDHandler handler = client.getCloudVarHandler();
131131
try {
132132
CloudQuery qry = new CloudQuery();
133133
qry.qryType = CloudQuery.CLOUD_LIB_INVOKE;
Collapse file

‎src/lambdacloud/core/CloudSD.java‎

Copy file name to clipboardExpand all lines: src/lambdacloud/core/CloudSD.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import io.netty.channel.Channel;
66
import lambdacloud.core.lang.LCAssign;
77
import lambdacloud.net.CloudQuery;
8-
import lambdacloud.net.CloudVarHandler;
9-
import lambdacloud.net.CloudVarRespHandler;
10-
import lambdacloud.net.CloudVarResp;
8+
import lambdacloud.net.CloudSDHandler;
9+
import lambdacloud.net.CloudSDRespHandler;
10+
import lambdacloud.net.CloudSDResp;
1111
import lambdacloud.net.CloudClient;
1212
import symjava.bytecode.BytecodeBatchFunc;
1313
import symjava.symbolic.Expr;
@@ -273,10 +273,10 @@ public boolean storeToCloud() {
273273
}
274274

275275
private boolean storeToCloud(CloudClient client) {
276-
CloudVarRespHandler handler = client.getCloudVarRespHandler();
276+
CloudSDRespHandler handler = client.getCloudVarRespHandler();
277277
try {
278278
client.getChannel().writeAndFlush(this).sync();
279-
CloudVarResp resp = handler.getCloudResp();
279+
CloudSDResp resp = handler.getCloudResp();
280280
if(resp.status == 0)
281281
this.isOnCloud = true;
282282
else
@@ -324,7 +324,7 @@ private boolean fetchToLocal(CloudClient client) {
324324
} catch (InterruptedException e) {
325325
e.printStackTrace();
326326
}
327-
CloudVarHandler h = client.getCloudVarHandler();
327+
CloudSDHandler h = client.getCloudVarHandler();
328328

329329
//while(true) {
330330
CloudSD var = h.getCloudVar();
Collapse file

‎src/lambdacloud/net/CloudClient.java‎

Copy file name to clipboardExpand all lines: src/lambdacloud/net/CloudClient.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public final class CloudClient {
2424
Channel ch;
2525
EventLoopGroup group;
2626

27-
CloudVarHandler varHandler;
28-
CloudVarRespHandler varRespHandler;
27+
CloudSDHandler varHandler;
28+
CloudSDRespHandler varRespHandler;
2929
CloudFuncHandler funcHandler;
3030

3131
static final boolean SSL = System.getProperty("ssl") != null;
@@ -54,8 +54,8 @@ public void connect() throws Exception {
5454
// Make a new connection.
5555
f = b.connect(host, port).sync();
5656
ch = f.channel();
57-
varHandler = (CloudVarHandler)f.channel().pipeline().get("CloudVarHandler");
58-
varRespHandler = (CloudVarRespHandler)f.channel().pipeline().get("CloudVarRespHandler");
57+
varHandler = (CloudSDHandler)f.channel().pipeline().get("CloudVarHandler");
58+
varRespHandler = (CloudSDRespHandler)f.channel().pipeline().get("CloudVarRespHandler");
5959
funcHandler = (CloudFuncHandler)f.channel().pipeline().get("CloudFuncHandler");
6060

6161
//ch.writeAndFlush(new CloudVar("xxxxxxx").init(1,2,3,4,5,6,7));
@@ -65,12 +65,12 @@ public void connect() throws Exception {
6565
}
6666
}
6767

68-
public CloudVarHandler getCloudVarHandler() {
68+
public CloudSDHandler getCloudVarHandler() {
6969
// Get the handler instance to retrieve the answer.
7070
return varHandler;
7171
}
7272

73-
public CloudVarRespHandler getCloudVarRespHandler() {
73+
public CloudSDRespHandler getCloudVarRespHandler() {
7474
// Get the handler instance to retrieve the answer.
7575
return varRespHandler;
7676
}
Collapse file

‎src/lambdacloud/net/CloudClientInitializer.java‎

Copy file name to clipboardExpand all lines: src/lambdacloud/net/CloudClientInitializer.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public void initChannel(SocketChannel ch) {
3535
pipeline.addLast(ZlibCodecFactory.newZlibDecoder(ZlibWrapper.GZIP));
3636

3737
// Add the number codec first,
38-
pipeline.addLast(new CloudVarEncoder());
38+
pipeline.addLast(new CloudSDEncoder());
3939
pipeline.addLast(new CloudQueryEncoder());
4040
pipeline.addLast(new CloudFuncEncoder());
4141
pipeline.addLast(new MessageDecoder());
4242

4343
// and then business logic.
4444
pipeline.addLast("CloudFuncHandler", new CloudFuncHandler());
45-
pipeline.addLast("CloudVarHandler", new CloudVarHandler());
46-
pipeline.addLast("CloudVarRespHandler", new CloudVarRespHandler());
45+
pipeline.addLast("CloudVarHandler", new CloudSDHandler());
46+
pipeline.addLast("CloudVarRespHandler", new CloudSDRespHandler());
4747

4848
}
4949
}
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import lambdacloud.core.CloudSD;
1111

12-
public class CloudVarEncoder extends MessageToByteEncoder<CloudSD> {
12+
public class CloudSDEncoder extends MessageToByteEncoder<CloudSD> {
1313
@Override
1414
protected void encode(ChannelHandlerContext ctx, CloudSD var, ByteBuf out) {
1515
// Convert to a BigInteger first for easier implementation.
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import lambdacloud.core.CloudSD;
1010

11-
public class CloudVarHandler extends SimpleChannelInboundHandler<CloudSD> {
11+
public class CloudSDHandler extends SimpleChannelInboundHandler<CloudSD> {
1212

1313
final BlockingQueue<CloudSD> queue = new LinkedBlockingQueue<CloudSD>();
1414

Collapse file
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package lambdacloud.net;
2+
3+
public class CloudSDResp extends CloudResp {
4+
public CloudSDResp() {
5+
this.respType = 1;
6+
}
7+
}
Collapse file

‎…lambdacloud/net/CloudVarRespEncoder.java‎ ‎…/lambdacloud/net/CloudSDRespEncoder.java‎src/lambdacloud/net/CloudVarRespEncoder.java renamed to src/lambdacloud/net/CloudSDRespEncoder.java src/lambdacloud/net/CloudVarRespEncoder.java renamed to src/lambdacloud/net/CloudSDRespEncoder.java

Copy file name to clipboardExpand all lines: src/lambdacloud/net/CloudSDRespEncoder.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import io.netty.channel.ChannelHandlerContext;
55
import io.netty.handler.codec.MessageToByteEncoder;
66

7-
public class CloudVarRespEncoder extends MessageToByteEncoder<CloudVarResp> {
7+
public class CloudSDRespEncoder extends MessageToByteEncoder<CloudSDResp> {
88
@Override
9-
protected void encode(ChannelHandlerContext ctx, CloudVarResp resp, ByteBuf out) {
9+
protected void encode(ChannelHandlerContext ctx, CloudSDResp resp, ByteBuf out) {
1010
out.writeByte((byte) 'R'); // magic number
1111
byte[] bytes = resp.getBytes();
1212
out.writeBytes(bytes);
Collapse file

‎…lambdacloud/net/CloudVarRespHandler.java‎ ‎…/lambdacloud/net/CloudSDRespHandler.java‎src/lambdacloud/net/CloudVarRespHandler.java renamed to src/lambdacloud/net/CloudSDRespHandler.java src/lambdacloud/net/CloudVarRespHandler.java renamed to src/lambdacloud/net/CloudSDRespHandler.java

Copy file name to clipboardExpand all lines: src/lambdacloud/net/CloudSDRespHandler.java
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import java.util.concurrent.BlockingQueue;
77
import java.util.concurrent.LinkedBlockingQueue;
88

9-
public class CloudVarRespHandler extends
10-
SimpleChannelInboundHandler<CloudVarResp> {
11-
final BlockingQueue<CloudVarResp> queue = new LinkedBlockingQueue<CloudVarResp>();
9+
public class CloudSDRespHandler extends
10+
SimpleChannelInboundHandler<CloudSDResp> {
11+
final BlockingQueue<CloudSDResp> queue = new LinkedBlockingQueue<CloudSDResp>();
1212

13-
public CloudVarResp getCloudResp() {
13+
public CloudSDResp getCloudResp() {
1414
boolean interrupted = false;
1515
try {
1616
for (;;) {
@@ -29,7 +29,7 @@ public CloudVarResp getCloudResp() {
2929

3030
@Override
3131
public void messageReceived(ChannelHandlerContext ctx,
32-
final CloudVarResp msg) {
32+
final CloudSDResp msg) {
3333
System.err.println("Received CloudVarResp: "+msg);
3434
queue.offer(msg);
3535
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.