Package org.waveprotocol.box.server.persistence.memory

Examples of org.waveprotocol.box.server.persistence.memory.MemoryDeltaStore


  private final Executor PERSIST_EXECUTOR = MoreExecutors.sameThreadExecutor();
  private DeltaStore store;

  @Override
  public void setUp() throws Exception {
    store = new MemoryDeltaStore();
    super.setUp();
  }
View Full Code Here


    when(localSigner.getSignerInfo()).thenReturn(null);
    when(localSigner.sign(Matchers.<ByteStringMessage<ProtocolWaveletDelta>>any()))
        .thenReturn(ImmutableList.<ProtocolSignature>of());

    certificateManager = new CertificateManagerImpl(true, localSigner, null, null);
    final DeltaStore deltaStore = new MemoryDeltaStore();
    final Executor waveletLoadExecutor = MoreExecutors.sameThreadExecutor();
    final Executor persistExecutor = MoreExecutors.sameThreadExecutor();
    final Executor storageContinuationExecutor = MoreExecutors.sameThreadExecutor();
    Factory localWaveletContainerFactory = new LocalWaveletContainer.Factory() {
      @Override
View Full Code Here

    addBlipOp = ProtocolWaveletOperation.newBuilder().setMutateDocument(
        MutateDocument.newBuilder().setDocumentId(BLIP_ID).setDocumentOperation(
            ProtocolDocumentOperation.newBuilder().build())).build();

    WaveletNotificationSubscriber notifiee = mock(WaveletNotificationSubscriber.class);
    DeltaStore deltaStore = new MemoryDeltaStore();
    WaveletState waveletState = DeltaStoreBasedWaveletState.create(deltaStore.open(WAVELET_NAME),
        PERSIST_EXECUTOR);
    wavelet = new LocalWaveletContainerImpl(WAVELET_NAME, notifiee,
        Futures.immediateFuture(waveletState), null, STORAGE_CONTINUATION_EXECUTOR);
    wavelet.awaitLoad();
  }
View Full Code Here

  @Override
  public void setUp() throws Exception {
    super.setUp();
    WaveletNotificationSubscriber notifiee = mock(WaveletNotificationSubscriber.class);
    DeltaStore deltaStore = new MemoryDeltaStore();
    WaveletState localWaveletState =
        DeltaStoreBasedWaveletState.create(deltaStore.open(localWaveletName), PERSIST_EXECUTOR);
    localWavelet = new LocalWaveletContainerImpl(localWaveletName, notifiee,
        Futures.immediateFuture(localWaveletState), localDomain, STORAGE_CONTINUATION_EXECUTOR);
    localWavelet.awaitLoad();
    WaveletState remoteWaveletState =
        DeltaStoreBasedWaveletState.create(deltaStore.open(remoteWaveletName), PERSIST_EXECUTOR);
    remoteWavelet = new RemoteWaveletContainerImpl(remoteWaveletName, notifiee,
        Futures.immediateFuture(remoteWaveletState), STORAGE_CONTINUATION_EXECUTOR);
    remoteWavelet.awaitLoad();
  }
View Full Code Here

  @Override
  protected void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);

    final DeltaStore deltaStore = new MemoryDeltaStore();
    final Executor persistExecutor = MoreExecutors.sameThreadExecutor();
    final Executor storageContinuationExecutor = MoreExecutors.sameThreadExecutor();
    LocalWaveletContainer.Factory localWaveletContainerFactory =
        new LocalWaveletContainer.Factory() {
          @Override
          public LocalWaveletContainer create(WaveletNotificationSubscriber notifiee,
              WaveletName waveletName, String domain) {
            WaveletState waveletState;
            try {
              waveletState = DeltaStoreBasedWaveletState.create(deltaStore.open(waveletName),
                  persistExecutor);
            } catch (PersistenceException e) {
              throw new RuntimeException(e);
            }
            return new LocalWaveletContainerImpl(waveletName, notifiee,
View Full Code Here

    when(waveViewProvider.retrievePerUserWaveView(SHARED_USER)).thenReturn(wavesViewUser3);

    conversationUtil = new ConversationUtil(idGenerator);
    digester = new WaveDigester(conversationUtil);

    final DeltaStore deltaStore = new MemoryDeltaStore();
    final Executor persistExecutor = MoreExecutors.sameThreadExecutor();
    final Executor storageContinuationExecutor = MoreExecutors.sameThreadExecutor();
    final Executor lookupExecutor = MoreExecutors.sameThreadExecutor();
    LocalWaveletContainer.Factory localWaveletContainerFactory =
        new LocalWaveletContainer.Factory() {
          @Override
          public LocalWaveletContainer create(WaveletNotificationSubscriber notifiee,
              WaveletName waveletName, String domain) {
            WaveletState waveletState;
            try {
              waveletState = DeltaStoreBasedWaveletState.create(deltaStore.open(waveletName),
                  persistExecutor);
            } catch (PersistenceException e) {
              throw new RuntimeException(e);
            }
            return new LocalWaveletContainerImpl(waveletName, notifiee,
View Full Code Here

TOP

Related Classes of org.waveprotocol.box.server.persistence.memory.MemoryDeltaStore

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.