Package org.apache.activemq.kaha.impl.async

Examples of org.apache.activemq.kaha.impl.async.ReadOnlyAsyncDataManager


        packet = journal.read(location3);
        assertEquals(data3, packet);
     
        ArrayList<File> data = new ArrayList<File>();
        data.add(logDirectory);
        ReadOnlyAsyncDataManager rodm = new ReadOnlyAsyncDataManager(data);
        rodm.start();
        try {
            for (Location curr = rodm.getFirstLocation(); curr != null; curr = rodm.getNextLocation(curr)) {
                ByteSequence bs = rodm.read(curr);
                assertNotNull(bs);
            }
        } finally {
          rodm.close();
        }
    }
View Full Code Here


      query = new Query();
      query.parse("select * from "+Entry.class.getName()+" where "+where);

    }

    ReadOnlyAsyncDataManager manager = new ReadOnlyAsyncDataManager(getDirs());
    manager.start();
    try {
      Location curr = manager.getFirstLocation();
      while (curr != null) {

        ByteSequence data = manager.read(curr);
        DataStructure c = (DataStructure) wireFormat.unmarshal(data);

        Entry entry = new Entry();
        entry.setLocation(curr);
        entry.setRecord(c);
        entry.setData(data);
        entry.setQuery(query);
        process(entry);

        curr = manager.getNextLocation(curr);
      }
    } finally {
      manager.close();
    }
  }
View Full Code Here

      query = new Query();
      query.parse("select * from "+Entry.class.getName()+" where "+where);

    }

    ReadOnlyAsyncDataManager manager = new ReadOnlyAsyncDataManager(getDirs());
    manager.start();
    try {
      Location curr = manager.getFirstLocation();
      while (curr != null) {

        ByteSequence data = manager.read(curr);
        DataStructure c = (DataStructure) wireFormat.unmarshal(data);

        Entry entry = new Entry();
        entry.setLocation(curr);
        entry.setRecord(c);
        entry.setData(data);
        entry.setQuery(query);
        process(entry);

        curr = manager.getNextLocation(curr);   
      }
    } finally {
      manager.close();
    }
  }
View Full Code Here

      query = new Query();
      query.parse("select * from "+Entry.class.getName()+" where "+where);

    }

    ReadOnlyAsyncDataManager manager = new ReadOnlyAsyncDataManager(getDirs());
    manager.start();
    try {
      Location curr = manager.getFirstLocation();
      while (curr != null) {

        ByteSequence data = manager.read(curr);
        DataStructure c = (DataStructure) wireFormat.unmarshal(data);

        Entry entry = new Entry();
        entry.setLocation(curr);
        entry.setRecord(c);
        entry.setData(data);
        entry.setQuery(query);
        process(entry);

        curr = manager.getNextLocation(curr);
      }
    } finally {
      manager.close();
    }
  }
View Full Code Here

      query = new Query();
      query.parse("select * from "+Entry.class.getName()+" where "+where);

    }

    ReadOnlyAsyncDataManager manager = new ReadOnlyAsyncDataManager(getDirs());
    manager.start();
    try {
      Location curr = manager.getFirstLocation();
      while (curr != null) {

        ByteSequence data = manager.read(curr);
        DataStructure c = (DataStructure) wireFormat.unmarshal(data);

        Entry entry = new Entry();
        entry.setLocation(curr);
        entry.setRecord(c);
        entry.setData(data);
        entry.setQuery(query);
        process(entry);

        curr = manager.getNextLocation(curr);
      }
    } finally {
      manager.close();
    }
  }
View Full Code Here

        packet = journal.read(location3);
        assertEquals(data3, packet);
     
        ArrayList<File> data = new ArrayList<File>();
        data.add(logDirectory);
        ReadOnlyAsyncDataManager rodm = new ReadOnlyAsyncDataManager(data);
        rodm.start();
        try {
            for (Location curr = rodm.getFirstLocation(); curr != null; curr = rodm.getNextLocation(curr)) {
                ByteSequence bs = rodm.read(curr);
                assertNotNull(bs);
            }
        } finally {
          rodm.close();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.kaha.impl.async.ReadOnlyAsyncDataManager

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.