Examples of InMemoryStorage


Examples of com.flaptor.indextank.index.storage.InMemoryStorage

            this.recoveryStorage = IndexRecoverer.IndexStorageValue.SIMPLEDB;
        }
       
        switch (storageValue) {
            case RAM:
                storage = new InMemoryStorage(baseDir, load);
                logger.info("Using in-memory storage");
                break;
            case NO:
                storage = null;
                logger.info("NOT Using storage");
View Full Code Here

Examples of com.flaptor.indextank.index.storage.InMemoryStorage

    public static void main(String[] args) throws IOException {
        File dir = new File(args[0]);
        int bc = Integer.parseInt(args[1]);
        NewPopularityIndex index = new NewPopularityIndex(dir);
        InMemoryStorage ims = new InMemoryStorage(dir, true);
        DynamicDataManager ddm = new DynamicDataManager(bc, dir);
        Scanner in = new Scanner(System.in);
       
        while (in.hasNextLine()) {
            String line = in.nextLine();
            if (line.startsWith("get ")) {
                String idStr = line.substring(4);
                DocId docId = new DocId(idStr);
                System.out.println(ims.getDocument(idStr));
                Boosts boosts = ddm.getBoosts(docId);
                System.out.println("timestamp: " + boosts.getTimestamp());
                for (int i = 0; i < bc; i++) {
                    System.out.println("var["+i+"]: " + boosts.getBoost(i));
                }
View Full Code Here

Examples of com.flaptor.indextank.index.storage.InMemoryStorage

    private String text;

  @Override
  protected void setUp() throws Exception {
        super.setUp();
    storage = new InMemoryStorage(FileUtil.createTempDir("testInMemoryStorage", ".tmp"), false);
    text = "The main doubt we have regarding the add-on is how should we support the service for testing environments. Currently, an IndexTank account allows you to create several indexes, either via the control panel or the api. The indextank client needs to be configured with the index code to use. Would it be ok for each Heroku user to create his own indexes and configure them for each environment on their own? or should we provide that out-of-the-box somehow";
  }
View Full Code Here

Examples of com.flaptor.indextank.index.storage.InMemoryStorage

        super.tearDown();       
    }
   
    @TestInfo(testType=TestType.UNIT)
    public void testTextOnlyDocument() throws InterruptedException, IOException {
        InMemoryStorage storage = new InMemoryStorage(FileUtil.createTempDir("testInMemoryStorage", ".tmp"), false);
        Document doc1 = new Document();
        doc1.setField("text", text);
        storage.saveDocument("a", doc1);
        Document dd1 = storage.getDocument("a");
        assertEquals("document retrieved didn't match document stored", doc1, dd1);
    }
View Full Code Here

Examples of com.flaptor.indextank.index.storage.InMemoryStorage

            this.recoveryStorage = IndexRecoverer.IndexStorageValue.SIMPLEDB;
        }
       
        switch (storageValue) {
            case RAM:
                storage = new InMemoryStorage(baseDir, load);
                logger.info("Using in-memory storage");
                break;
            case NO:
                storage = null;
                logger.info("NOT Using storage");
View Full Code Here

Examples of org.elasticmq.storage.inmemory.InMemoryStorage

    private SQSTaskTimerBean taskTimerBean = new SQSTaskTimerBeanMock();

    @BeforeClass
    public void setupElasticMQ() {
        elasticNode = NodeBuilder.withStorage(new InMemoryStorage());
        sqsServer = new SQSRestServerBuilder(elasticNode.nativeClient(), ELASTIMQ_PORT, new NodeAddress("http", "localhost", ELASTIMQ_PORT, "")).start();

        AmazonSQSClient sqsClient = new AmazonSQSClient(new BasicAWSCredentials("1234", "1234"));
        sqsClient.setEndpoint("http://localhost:" + ELASTIMQ_PORT);
        sqsClient.createQueue(new CreateQueueRequest(TEST_QUEUE));
View Full Code Here

Examples of org.elasticmq.storage.inmemory.InMemoryStorage

    private boolean queueCreated = false;

    @BeforeClass
    public void setupElasticMQ() {
        elasticNode = NodeBuilder.withStorage(new InMemoryStorage());
        sqsServer = new SQSRestServerBuilder(elasticNode.nativeClient(), ELASTIMQ_PORT,
                new NodeAddress("http", "localhost", ELASTIMQ_PORT, "")).start();
    }
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.