Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangInt


    case DOUBLE:
      return new OtpErlangDouble(Double.parseDouble(field.stringValue()));
    case FLOAT:
      return new OtpErlangFloat(Float.parseFloat(field.stringValue()));
    case INT:
      return new OtpErlangInt(Integer.parseInt(field.stringValue()));
    case LONG:
      return new OtpErlangLong(Long.parseLong(field.stringValue()));
    case ATOM:
      return new OtpErlangAtom(field.stringValue());
    case GEO:
View Full Code Here


  private OtpErlangObject[] getInts(IndexReader reader) throws IOException {
    final OtpErlangObject[] docValues;
    int[] origs = FieldCache.DEFAULT.getInts(reader, this.fieldName);
    docValues = new OtpErlangObject[origs.length];
    for (int i = 0; i < origs.length; i++) {
      docValues[i] = new OtpErlangInt(origs[i]);
    }
    return docValues;
  }
View Full Code Here

     *             if any other error occurs
     */
    public AddNodesResult addNodes(final int number)
            throws ConnectionException, UnknownException {
        final OtpErlangObject received_raw = connection.doRPC("api_vm", "add_nodes",
                    new OtpErlangObject[] { new OtpErlangInt(number) });
        try {
            final OtpErlangTuple received = (OtpErlangTuple) received_raw;
            final List<String> successful = new ErlangValue(received.elementAt(0)).stringListValue();
            final OtpErlangList errors = ErlangValue.otpObjectToOtpList(received.elementAt(1));
            String error_str;
View Full Code Here

     *             if any other error occurs
     */
    public List<String> shutdownNodes(final int number)
            throws ConnectionException, UnknownException {
        final OtpErlangObject received_raw = connection.doRPC("api_vm", "shutdown_nodes",
                    new OtpErlangObject[] { new OtpErlangInt(number) });
        return makeDeleteResult(received_raw);
    }
View Full Code Here

     *             if any other error occurs
     */
    public List<String> killNodes(final int number)
            throws ConnectionException, UnknownException {
        final OtpErlangObject received_raw = connection.doRPC("api_vm", "kill_nodes",
                    new OtpErlangObject[] { new OtpErlangInt(number) });
        return makeDeleteResult(received_raw);
    }
View Full Code Here

     */
    public int delete(final OtpErlangString key, final int timeout) throws ConnectionException,
    TimeoutException, UnknownException {
        lastDeleteResult = null;
        final OtpErlangObject received_raw = connection.doRPC("api_rdht", "delete",
                new OtpErlangObject[] { key, new OtpErlangInt(timeout) });
        try {
            final OtpErlangTuple received = (OtpErlangTuple) received_raw;
            final OtpErlangAtom state = (OtpErlangAtom) received.elementAt(0);

            /*
 
View Full Code Here

        final PeerNode remote = new PeerNode(ConnectionFactory.getInstance()
                .getNodes().get(0).getNode().node());
        final Connection c = new Connection(self, remote);

        final OtpErlangObject raw_result = c.doRPC("lists", "sum", new OtpErlangList(
                new OtpErlangList(new OtpErlangObject[] { new OtpErlangInt(1),
                        new OtpErlangInt(2), new OtpErlangInt(3) })));
        final OtpErlangLong result = (OtpErlangLong) raw_result;

        assertEquals(6, result.intValue());
        assertNotNull(remote.getLastConnectSuccess());
        assertEquals(0, remote.getFailureCount());
View Full Code Here

        c.close();

        try {
            c.doRPC("lists", "sum",
                    new OtpErlangList(new OtpErlangList(new OtpErlangObject[] {
                            new OtpErlangInt(1), new OtpErlangInt(2),
                            new OtpErlangInt(3) })));
            c.close();
            // this should have failed!
            fail();
        } catch (final Exception e) {
        }
View Full Code Here

                .getNodes().get(0).getNode().node());
        final Connection c = new Connection(self, remote);

        final OtpErlangObject raw_result = c.doRPC("lists", "sum",
                new OtpErlangObject[] { new OtpErlangList(
                        new OtpErlangObject[] { new OtpErlangInt(1),
                                new OtpErlangInt(2), new OtpErlangInt(3) }) });
        final OtpErlangLong result = (OtpErlangLong) raw_result;

        assertEquals(6, result.intValue());
        assertNotNull(remote.getLastConnectSuccess());
        assertEquals(0, remote.getFailureCount());
View Full Code Here

        c.close();

        try {
            c.doRPC("lists", "sum",
                    new OtpErlangObject[] { new OtpErlangList(
                            new OtpErlangObject[] { new OtpErlangInt(1),
                                    new OtpErlangInt(2), new OtpErlangInt(3) }) });
            c.close();
            // this should have failed!
            fail();
        } catch (final Exception e) {
        }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangInt

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.