@Test public void testRootHeads() { Long id = await(repository.createCommitId()); await(repository.pushAndUpdateHead(ofRoot(id))); Set<Long> heads = await(repository.getHeads()); assertEquals(1, heads.size()); assertEquals(1, first(heads).intValue()); }
public Promise<Long> createCommitId() { return idGenerator.createId(); }
OTRepositoryMySql implements OTRepositoryEx<Long, D>, EventloopJmxBeanEx { public Promise<Long> createCommitId() { return idGenerator.createId(); } }
OTRepositoryMySql implements OTRepositoryEx<Long, D>, EventloopJmxBeanEx { public Promise<Long> createCommitId() { return idGenerator.createId(); } private  OTRepositoryMySql(Eventloop eventloop, Executor executor, DataSource dataSource, IdGenerator<Long> idGenerator,
			OTSystem<D> otSystem, StructuredCodec<List<D>> diffsCodec); }
OTRepositoryMySql implements OTRepositoryEx<Long, D>, EventloopJmxBeanEx { public Promise<Long> createCommitId() { return idGenerator.createId(); } private  OTRepositoryMySql(Eventloop eventloop, Executor executor, DataSource dataSource, IdGenerator<Long> idGenerator,
			OTSystem<D> otSystem, StructuredCodec<List<D>> diffsCodec); static OTRepositoryMySql<D> create(Eventloop eventloop, Executor executor, DataSource dataSource, IdGenerator<Long> idGenerator,
			OTSystem<D> otSystem, StructuredCodec<D> diffCodec); OTRepositoryMySql<D> withCreatedBy(String createdBy); OTRepositoryMySql<D> withCustomTableNames(String tableRevision, String tableDiffs, @Nullable String tableBackup); DataSource getDataSource(); StructuredCodec<List<D>> getDiffsCodec(); void initialize(); void truncateTables(); Promise<Long> createCommitId(); @Override Promise<OTCommit<Long, D>> createCommit(Map<Long, DiffsWithLevel<D>> parentDiffs); @Override Promise<Void> push(Collection<OTCommit<Long, D>> commits); @NotNull @Override Promise<Void> updateHeads(Set<Long> newHeads, Set<Long> excludedHeads); @NotNull @Override Promise<Set<Long>> getAllHeads(); @Override @NotNull Promise<Boolean> hasCommit(@NotNull Long revisionId); @NotNull @Override Promise<OTCommit<Long, D>> loadCommit(@NotNull Long revisionId); @NotNull @Override Promise<Boolean> hasSnapshot(@NotNull Long revisionId); @NotNull @Override Promise<Optional<List<D>>> loadSnapshot(@NotNull Long revisionId); @NotNull @Override Promise<Void> saveSnapshot(@NotNull Long revisionId, @NotNull List<D> diffs); @Override Promise<Void> cleanup(Long minId); @Override Promise<Void> backup(OTCommit<Long, D> commit, List<D> snapshot); @NotNull @Override Eventloop getEventloop(); @JmxAttribute PromiseStats getPromiseCreateCommitId(); @JmxAttribute PromiseStats getPromisePush(); @JmxAttribute PromiseStats getPromiseGetHeads(); @JmxAttribute PromiseStats getPromiseHasCommit(); @JmxAttribute PromiseStats getPromiseLoadCommit(); @JmxAttribute PromiseStats getPromiseIsSnapshot(); @JmxAttribute PromiseStats getPromiseHasSnapshot(); @JmxAttribute PromiseStats getPromiseLoadSnapshot(); @JmxAttribute PromiseStats getPromiseSaveSnapshot(); }
OTRepositoryMySql implements OTRepositoryEx<Long, D>, EventloopJmxBeanEx { public Promise<Long> createCommitId() { return idGenerator.createId(); } private  OTRepositoryMySql(Eventloop eventloop, Executor executor, DataSource dataSource, IdGenerator<Long> idGenerator,
			OTSystem<D> otSystem, StructuredCodec<List<D>> diffsCodec); static OTRepositoryMySql<D> create(Eventloop eventloop, Executor executor, DataSource dataSource, IdGenerator<Long> idGenerator,
			OTSystem<D> otSystem, StructuredCodec<D> diffCodec); OTRepositoryMySql<D> withCreatedBy(String createdBy); OTRepositoryMySql<D> withCustomTableNames(String tableRevision, String tableDiffs, @Nullable String tableBackup); DataSource getDataSource(); StructuredCodec<List<D>> getDiffsCodec(); void initialize(); void truncateTables(); Promise<Long> createCommitId(); @Override Promise<OTCommit<Long, D>> createCommit(Map<Long, DiffsWithLevel<D>> parentDiffs); @Override Promise<Void> push(Collection<OTCommit<Long, D>> commits); @NotNull @Override Promise<Void> updateHeads(Set<Long> newHeads, Set<Long> excludedHeads); @NotNull @Override Promise<Set<Long>> getAllHeads(); @Override @NotNull Promise<Boolean> hasCommit(@NotNull Long revisionId); @NotNull @Override Promise<OTCommit<Long, D>> loadCommit(@NotNull Long revisionId); @NotNull @Override Promise<Boolean> hasSnapshot(@NotNull Long revisionId); @NotNull @Override Promise<Optional<List<D>>> loadSnapshot(@NotNull Long revisionId); @NotNull @Override Promise<Void> saveSnapshot(@NotNull Long revisionId, @NotNull List<D> diffs); @Override Promise<Void> cleanup(Long minId); @Override Promise<Void> backup(OTCommit<Long, D> commit, List<D> snapshot); @NotNull @Override Eventloop getEventloop(); @JmxAttribute PromiseStats getPromiseCreateCommitId(); @JmxAttribute PromiseStats getPromisePush(); @JmxAttribute PromiseStats getPromiseGetHeads(); @JmxAttribute PromiseStats getPromiseHasCommit(); @JmxAttribute PromiseStats getPromiseLoadCommit(); @JmxAttribute PromiseStats getPromiseIsSnapshot(); @JmxAttribute PromiseStats getPromiseHasSnapshot(); @JmxAttribute PromiseStats getPromiseLoadSnapshot(); @JmxAttribute PromiseStats getPromiseSaveSnapshot(); static final Duration DEFAULT_SMOOTHING_WINDOW; static final String DEFAULT_REVISION_TABLE; static final String DEFAULT_DIFFS_TABLE; static final String DEFAULT_BACKUP_TABLE; }