Package org.openrdf.sail.memory

Examples of org.openrdf.sail.memory.MemoryStore.initialize()


    }

    // Quickly reaches a peak of around 1,900 t/s before slowing down and failing due to lack of memory.
    private void testMemoryPersister() throws Exception {
        Sail sail = new MemoryStore();
        sail.initialize();

        try {
            TweetStore store = new TweetStore(sail);
            store.initialize();
            try {
View Full Code Here


    }

    // Reaches a peak of around 2,100 t/s and remains there indefinitely
    private void testTransientMemoryPersister() throws Exception {
        Sail sail = new MemoryStore();
        sail.initialize();

        try {
            TweetStore store = new TweetStore(sail);
            store.initialize();
            try {
View Full Code Here

    }

    // Around 900 t/s (up from 500 t/s before omitting read-operation logging)
    private void testLoggingTransientMemoryPersister() throws Exception {
        Sail baseSail = new MemoryStore();
        baseSail.initialize();

        OutputStream out = new FileOutputStream(new File("/tmp/throughput-test.log"));
        RecorderSail sail = new RecorderSail(baseSail, out);
        sail.getConfiguration().logReadOperations = false;
        //sail.getConfiguration().logTransactions = false;
View Full Code Here

        try {
            AGRepositoryConnection rc = repo.getConnection();
            try {
                //rc.begin();
                Sail tSail = new MemoryStore();
                tSail.initialize();

                try {
                    Sail sail = new AGTransactionSail(tSail, rc, commitsPerUpload);
                    try {
View Full Code Here

    }

    // Around 1000 t/s on the reference machine.  No network requests are made.
    private void testTrivialRdfTransactionPersister() throws Exception {
        Sail transientSail = new MemoryStore();
        transientSail.initialize();

        try {
            Sail sail = new TrivialTransactionSail(transientSail);
            try {
                TweetStore store = new TweetStore(sail);
View Full Code Here

        }
    }

    private void testSocketBasedLoggingTransientMemoryPersister() throws Exception {
        Sail baseSail = new MemoryStore();
        baseSail.initialize();

        DatagramSocket s = new DatagramSocket();

        String msg = "15663\tADD_STATEMENT\t<http://twitlogic.fortytwo.net/post/twitter/-1129589402>\t<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>\t<http://rdfs.org/sioc/types#MicroblogPost>\t{}";
        byte[] buf = msg.getBytes();
View Full Code Here

//            InetAddress address = InetAddress.getByName("foray");
        //int port = 9999;

        Sail workingSail = new MemoryStore();
        workingSail.initialize();

        try {
            Sail streamingSail = new UdpTransactionSail(workingSail, address, udpOutputPorts);

            try {
View Full Code Here

    private RippleSailDemo() {
    }

    private static void runDemo() throws Exception {
        Sail storage = new MemoryStore();
        storage.initialize();
        Sail linkedData = new LinkedDataSail(storage);
        linkedData.initialize();

        RippleSail ripple = new RippleSail(linkedData);
        ripple.initialize();
View Full Code Here

        return count;
    }

    public void testRecoverFromParseError() throws Exception {
        Sail sail = new MemoryStore();
        sail.initialize();

        String bad = "bad";

        String good = "@prefix foo:  <http://example.org/foo#>.\n"
                + "foo:a foo:b foo:c.";
View Full Code Here

        }
    }

    public void testAddFromInputStream() throws Exception {
        Sail sail = new MemoryStore();
        sail.initialize();
        SailConnection sc = sail.getConnection();
        try {
            sc.begin();

            URI ctxA = sail.getValueFactory().createURI("urn:test.AddFromInputStreamTest.ctxA#");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.