Package net.fortytwo.sesametools.replay

Examples of net.fortytwo.sesametools.replay.RecorderSail


        if (enableLogging) {
            File logFile = new File("/tmp/twitlogic-ag-sail.log");
            Sail recorderSail;
            try {
                recorderSail = new RecorderSail(sail, new FileOutputStream(logFile));
            } catch (FileNotFoundException e) {
                throw new SailException(e);
            }

            //return sail;
View Full Code Here


    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;

        try {
            TweetStore store = new TweetStore(sail);
            store.initialize();
            try {
                final SailConnection sc = baseSail.getConnection();
                try {
                    final TweetPersister p = new TweetPersister(store, null);

                    Handler<Tweet> h = new Handler<Tweet>() {
                        public boolean isOpen() {
                            return p.isOpen();
                        }

                        public void handle(final Tweet tweet) throws HandlerException {
                            try {
                                sc.clear();
                                sc.commit();
                                sc.begin();
                            } catch (SailException e) {
                                throw new HandlerException(e);
                            }
                            p.handle(tweet);
                        }
                    };

                    stressTest(h, 1000);
                } finally {
                    sc.close();
                }
            } finally {
                store.shutDown();
            }
        } finally {
            sail.shutDown();
        }
    }
View Full Code Here

        //System.out.println("creating Sail of type: " + sailType);

        String sailLog = Ripple.getConfiguration().getString(Ripple.SAIL_LOG, null);
        if (null != sailLog) {
            try {
                sail = new RecorderSail(sail, new FileOutputStream(sailLog));
                // note: base Sail is already initialized
            } catch (FileNotFoundException e) {
                throw new RippleException(e);
            }
        }
View Full Code Here

TOP

Related Classes of net.fortytwo.sesametools.replay.RecorderSail

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.