public StoredDestination readPayload(DataInput dataIn) throws IOException { StoredDestination value = new StoredDestination(); value.orderIndex = new BTreeIndex<Long, MessageRecord>(pageFile, dataIn.readLong()); value.messageIdIndex = new BTreeIndex<String, Long>(pageFile, dataIn.readLong()); if (dataIn.readBoolean()) { value.subscriptions = new BTreeIndex<String, KahaSubscriptionCommand>(pageFile, dataIn.readLong()); value.subscriptionAcks = new BTreeIndex<String, Long>(pageFile, dataIn.readLong()); } return value; }
void allocate(Transaction tx) throws IOException { defaultPriorityIndex = new BTreeIndex<>(pageFile, tx.allocate()); if (metadata.version >= 2) { lowPriorityIndex = new BTreeIndex<>(pageFile, tx.allocate()); highPriorityIndex = new BTreeIndex<>(pageFile, tx.allocate()); } }
void createIndexes(Transaction tx) throws IOException { this.storedSchedulers = new BTreeIndex<String, LegacyJobSchedulerImpl>(pageFile, tx.allocate().getPageId()); this.journalRC = new BTreeIndex<Integer, Integer>(pageFile, tx.allocate().getPageId()); }
public void read(DataInput is) throws IOException { this.storedSchedulers = new BTreeIndex<String, LegacyJobSchedulerImpl>(pageFile, is.readLong()); this.storedSchedulers.setKeyMarshaller(StringMarshaller.INSTANCE); this.storedSchedulers.setValueMarshaller(new JobSchedulerMarshaller(this.store)); this.journalRC = new BTreeIndex<Integer, Integer>(pageFile, is.readLong()); this.journalRC.setKeyMarshaller(IntegerMarshaller.INSTANCE); this.journalRC.setValueMarshaller(IntegerMarshaller.INSTANCE); }
void read(DataInput in) throws IOException { this.name = in.readUTF(); this.index = new BTreeIndex<>(this.store.getPageFile(), in.readLong()); this.index.setKeyMarshaller(LongMarshaller.INSTANCE); this.index.setValueMarshaller(JobLocationsMarshaller.INSTANCE); }
void read(DataInput in) throws IOException { this.name = in.readUTF(); this.index = new BTreeIndex<Long, List<LegacyJobLocation>>(this.store.getPageFile(), in.readLong()); this.index.setKeyMarshaller(LongMarshaller.INSTANCE); this.index.setValueMarshaller(ValueMarshaller.INSTANCE); }
void createIndexes(Transaction tx) throws IOException { this.lists = new BTreeIndex<String, PListImpl>(pageFile, tx.allocate().getPageId()); }
public void read(DataInput is) throws IOException { this.lists = new BTreeIndex<String, PListImpl>(pageFile, is.readLong()); this.lists.setKeyMarshaller(StringMarshaller.INSTANCE); this.lists.setValueMarshaller(new PListMarshaller(this.store)); }
public void read(DataInput is) throws IOException { state = is.readInt(); destinations = new BTreeIndex<>(pageFile, is.readLong()); if (is.readBoolean()) { lastUpdate = LocationMarshaller.INSTANCE.readPayload(is);
@Override public void initialize(Transaction tx) throws IOException { this.storedSchedulers = new BTreeIndex<String, JobSchedulerImpl>(store.getPageFile(), tx.allocate().getPageId()); this.journalRC = new BTreeIndex<Integer, Integer>(store.getPageFile(), tx.allocate().getPageId()); this.removeLocationTracker = new BTreeIndex<Integer, List<Integer>>(store.getPageFile(), tx.allocate().getPageId()); }
void createIndexes(Transaction tx) throws IOException { this.index = new BTreeIndex<>(this.store.getPageFile(), tx.allocate().getPageId()); }
void createIndexes(Transaction tx) throws IOException { this.index = new BTreeIndex<Long, List<LegacyJobLocation>>(this.store.getPageFile(), tx.allocate().getPageId()); }
@Override public void read(DataInput in) throws IOException { try { long msb = in.readLong(); long lsb = in.readLong(); this.token = new UUID(msb, lsb); } catch (Exception e) { throw new UnknownStoreVersionException(e); } if (!token.equals(JobSchedulerStoreImpl.SCHEDULER_STORE_TOKEN)) { throw new UnknownStoreVersionException(token.toString()); } this.version = in.readInt(); if (in.readBoolean()) { setLastUpdateLocation(LocationMarshaller.INSTANCE.readPayload(in)); } else { setLastUpdateLocation(null); } this.storedSchedulers = new BTreeIndex<String, JobSchedulerImpl>(store.getPageFile(), in.readLong()); this.storedSchedulers.setKeyMarshaller(StringMarshaller.INSTANCE); this.storedSchedulers.setValueMarshaller(new JobSchedulerMarshaller(this.store)); this.journalRC = new BTreeIndex<Integer, Integer>(store.getPageFile(), in.readLong()); this.journalRC.setKeyMarshaller(IntegerMarshaller.INSTANCE); this.journalRC.setValueMarshaller(IntegerMarshaller.INSTANCE); this.removeLocationTracker = new BTreeIndex<Integer, List<Integer>>(store.getPageFile(), in.readLong()); this.removeLocationTracker.setKeyMarshaller(IntegerMarshaller.INSTANCE); this.removeLocationTracker.setValueMarshaller(new IntegerListMarshaller()); LOG.info("Scheduler Store version {} loaded", this.version); }
@Override public StoredDestination readPayload(final DataInput dataIn) throws IOException { final StoredDestination value = new StoredDestination(); value.orderIndex.defaultPriorityIndex = new BTreeIndex<>(pageFile, dataIn.readLong()); value.locationIndex = new BTreeIndex<>(pageFile, dataIn.readLong()); value.messageIdIndex = new BTreeIndex<>(pageFile, dataIn.readLong()); value.subscriptions = new BTreeIndex<>(pageFile, dataIn.readLong()); value.subscriptionAcks = new BTreeIndex<>(pageFile, dataIn.readLong()); if (metadata.version >= 4) { value.ackPositions = new ListIndex<>(pageFile, dataIn.readLong()); value.orderIndex.lowPriorityIndex = new BTreeIndex<>(pageFile, dataIn.readLong()); value.orderIndex.highPriorityIndex = new BTreeIndex<>(pageFile, dataIn.readLong()); } else { @Override public void execute(Transaction tx) throws IOException { value.orderIndex.lowPriorityIndex = new BTreeIndex<>(pageFile, tx.allocate()); value.orderIndex.lowPriorityIndex.setKeyMarshaller(LongMarshaller.INSTANCE); value.orderIndex.lowPriorityIndex.setValueMarshaller(messageKeysMarshaller);
rc.orderIndex = new BTreeIndex<Long, MessageRecord>(pageFile, tx.allocate()); rc.messageIdIndex = new BTreeIndex<String, Long>(pageFile, tx.allocate()); rc.subscriptions = new BTreeIndex<String, KahaSubscriptionCommand>(pageFile, tx.allocate()); rc.subscriptionAcks = new BTreeIndex<String, Long>(pageFile, tx.allocate());
rc.locationIndex = new BTreeIndex<>(pageFile, tx.allocate()); rc.messageIdIndex = new BTreeIndex<>(pageFile, tx.allocate()); rc.subscriptions = new BTreeIndex<>(pageFile, tx.allocate()); rc.subscriptionAcks = new BTreeIndex<>(pageFile, tx.allocate()); rc.ackPositions = new ListIndex<>(pageFile, tx.allocate()); rc.subLocations = new ListIndex<>(pageFile, tx.allocate());
public StoredDestination readPayload(DataInput dataIn) throws IOException { StoredDestination value = new StoredDestination(); value.orderIndex = new BTreeIndex<Long, MessageRecord>(pageFile, dataIn.readLong()); value.messageIdIndex = new BTreeIndex<String, Long>(pageFile, dataIn.readLong()); if (dataIn.readBoolean()) { value.subscriptions = new BTreeIndex<String, KahaSubscriptionCommand>(pageFile, dataIn.readLong()); value.subscriptionAcks = new BTreeIndex<String, Long>(pageFile, dataIn.readLong()); } return value; }
void allocate(Transaction tx) throws IOException { defaultPriorityIndex = new BTreeIndex<>(pageFile, tx.allocate()); if (metadata.version >= 2) { lowPriorityIndex = new BTreeIndex<>(pageFile, tx.allocate()); highPriorityIndex = new BTreeIndex<>(pageFile, tx.allocate()); } }
void read(DataInput in) throws IOException { this.name = in.readUTF(); this.index = new BTreeIndex<>(this.store.getPageFile(), in.readLong()); this.index.setKeyMarshaller(LongMarshaller.INSTANCE); this.index.setValueMarshaller(JobLocationsMarshaller.INSTANCE); }
@Override public void initialize(Transaction tx) throws IOException { this.storedSchedulers = new BTreeIndex<String, JobSchedulerImpl>(store.getPageFile(), tx.allocate().getPageId()); this.journalRC = new BTreeIndex<Integer, Integer>(store.getPageFile(), tx.allocate().getPageId()); this.removeLocationTracker = new BTreeIndex<Integer, List<Integer>>(store.getPageFile(), tx.allocate().getPageId()); }