Package org.fusesource.hawtjournal.api

Examples of org.fusesource.hawtjournal.api.Location.readExternal()


  @Override
  public User getUser(int userId) {
    try {
      Location location = new Location();
      JournalUserStorage.MetaData metaData = metaDataList.get(userId);
      location.readExternal(ByteStreams.newDataInput(metaData.getLocation()));
      return User.fromByteBuffer(userJournal.read(location));
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here


  @Override
  public Event getEvent(long eventId) {
    try {
      Location location = new Location();
      JournalEventStorage.MetaData metaData = metaDataList.get(eventId);
      location.readExternal(ByteStreams.newDataInput(metaData.getLocation()));
      return Event.fromByteBuffer(eventJournal.read(location));
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
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.