Mercurial > hg > FederatedLinda
view src/fdl/test/TestEtc.java @ 93:a1d796c0e975 fuchita
Wait Read Tester
author | one |
---|---|
date | Tue, 25 May 2010 22:57:54 +0900 |
parents | 82a292aa41ad |
children |
line wrap: on
line source
package fdl.test; import java.io.IOException; import fdl.PSXQueue; public class TestEtc { static final int MAX_REQ = 1; static final int FAIL = (-1); static final int MAX_UAER = 4; static final int MAX_TUPLE = 65536; static final int MAX_BUFFSIZE = 2048; static final int DEF_PORT = 10000; static final String PATHNAME = "/tmp/ldserv"; static final int LINDA_MODE_OFFSET = 0; static final int LINDA_ID_OFFSET = 1; static final int LINDA_SEQ_OFFSET = 3; static final int LINDA_DATA_LENGTH_OFFSET = 7; static final int LINDA_HEADER_SIZE = 12; static final boolean debug = true; public PSXQueue tuple_space; public PSXQueue tp; public static void main(String[] args) throws IOException { String socketString = "java.nio.channels.SocketChannel[connected local=/133.13.57.210:10001 remote=/133.13.57.210:50634]"; String[] split = socketString.split("/"); String local[] = split[1].split(" "); String remote[] = split[2].split("]"); @SuppressWarnings("unused") final String localAddress = local[0]; @SuppressWarnings("unused") final String remoteAddress = remote[0]; System.out.println(local[0]); System.out.println(remote[0]); // System.out.println("tmpTuple "+tmpTuple.toString()); // System.out.println("testTS "+testTS[MAX_TUPLE-1].toString()); } }