Package org.agilewiki.jid.scalar.vlens.string

Examples of org.agilewiki.jid.scalar.vlens.string.StringJid


            factory.registerActorFactory(stringListFactory);
            BListJid stringList1 = (BListJid) factory.newActor("sl");
            stringList1.iAdd(0);
            stringList1.iAdd(1);
            stringList1.iAdd(2);
            StringJid sj0 = (StringJid) stringList1.iGet(0);
            StringJid sj1 = (StringJid) stringList1.iGet(1);
            StringJid sj2 = (StringJid) stringList1.iGet(2);
            sj0.setValue("a");
            sj1.setValue("b");
            sj2.setValue("c");
            BListJid stringList2 = (BListJid) stringList1.copyJID(mailbox);
            StringJid s0 = (StringJid) stringList2.iGet(0);
            StringJid s1 = (StringJid) stringList2.iGet(1);
            StringJid s2 = (StringJid) stringList2.iGet(2);
            assertEquals("a", s0.getValue());
            assertEquals("b", s1.getValue());
            assertEquals("c", s2.getValue());
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            mailboxFactory.close();
        }
View Full Code Here


            assertTrue(m.kMake("1"));
            assertFalse(m.kMake("1"));
            assertEquals(1, m.size());
            MapEntry<String, StringJid> me = m.iGet(0);
            assertEquals("1", me.getKey());
            StringJid v = m.kGet("1");
            assertEquals(v, me.getValue());
            assertEquals(me, m.getCeiling("0"));
            assertEquals(me, m.getCeiling("1"));
            assertNull(m.getCeiling("2"));
            assertEquals(me, m.getHigher("0"));
View Full Code Here

            UnionJid siu1 = (UnionJid) factory.newActor("siUnion");
            assertNull(siu1.getValue());
            UnionJid siu2 = (UnionJid) siu1.copyJID(mailbox);
            assertNull(siu2.getValue());
            siu2.setValue(StringJidFactory.fac);
            StringJid sj2 = (StringJid) siu2.getValue();
            assertNotNull(sj2);
            UnionJid siu3 = (UnionJid) siu2.copyJID(mailbox);
            StringJid sj3 = (StringJid) siu3.getValue();
            assertNotNull(sj3);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            mailboxFactory.close();
View Full Code Here

import org.agilewiki.jid.scalar.vlens.string.StringJid;

public class User extends TupleJid implements Main {
    @Override
    public void processRequest(Proc request, RP rp) throws Exception {
        StringJid name = (StringJid) iGet(0);
        System.out.println("name: " + name.getValue());
        IntegerJid age = (IntegerJid) iGet(1);
        System.out.println("age: " + age.getValue());
        StringJid location = (StringJid) iGet(2);
        System.out.println("location: " + location.getValue());
        rp.processResponse(null);
    }
View Full Code Here

        RootJid root = new RootJid();
        root.initialize(mailbox, factory);
        (new SetActor("users")).send(future, root);
        Users users = (Users) (new ResolvePathname("0")).send(future, root);
        new KMake<String, User>("John").send(future, users);
        StringJid jEmail = (StringJid) new KGet<String, User>("John").send(future, users);
        jEmail.setValue("john123@gmail.com");
        new KMake<String, User>("Sam").send(future, users);
        StringJid sEmail = (StringJid) new KGet<String, User>("Sam").send(future, users);
        sEmail.setValue("sammyjr@yahoo.com");
        new KMake<String, User>("Fred").send(future, users);
        StringJid fEmail = (StringJid) new KGet<String, User>("Fred").send(future, users);
        fEmail.setValue("fredk@gmail.com");
        byte[] rootBytes = GetSerializedBytes.req.send(future, root);

        RootJid root2 = new RootJid();
        root2.initialize(mailbox, factory);
        root2.load(rootBytes);
View Full Code Here

        initializeList();
        Iterator<_Jid> it = list.iterator();
        while (it.hasNext()) {
            MapEntry<String, StringJid> tj = (MapEntry) it.next();
            String name = tj.getKey();
            StringJid email = (StringJid) tj.getValue();
            System.out.println("name: " + name + ", email: " + email.getValue());
        }
        rp.processResponse(null);
    }
View Full Code Here

        return (StringJid) getJid(key);
    }

    public String getString(String key)
            throws Exception {
        StringJid sj = getStringJid(key);
        if (sj == null)
            return null;
        return sj.getValue();
    }
View Full Code Here

                if (!closed)
                    System.out.println("----> Checkpoint Exception: " + exception);
            }
        });
        if (!pendingWrite) {
            StringJid sj = makeStringJid(LOG_FILE_NAME);
            sj.setValue(logFileName);
            LongJid lj = makeLongJid(LOG_POSITION);
            lj.setValue(logPosition);
            pendingWrite = true;
            Block block = newDbBlock();
            rootJid = (RootJid) rootJid.copyJID(getMailboxFactory().createMailbox());
View Full Code Here

TOP

Related Classes of org.agilewiki.jid.scalar.vlens.string.StringJid

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.