Package com.google.collide.shared.util.ListenerRegistrar

Examples of com.google.collide.shared.util.ListenerRegistrar.RemoverManager


  /**
   * @return whether we are waiting for unacked or queued doc ops
   */
  public boolean notifyForDocuments(Callback callback, int... documentIds) {
    RemoverManager remover = new RemoverManager();
    JsonIntegerMap<Integer> remainingAcksByDocumentId = JsonCollections.createIntegerMap();

    for (int i = 0; i < documentIds.length; i++) {
      int documentId = documentIds[i];

      if (!DocumentMetadata.isLinkedToFile(documentManager.getDocumentById(documentId))) {
        // Ignore unlinked files
        continue;
      }
     
      DocumentCollaborationController documentCollaborationController =
          collaborationManager.getDocumentCollaborationController(documentId);
      Preconditions.checkNotNull(documentCollaborationController,
          "Could not find collaboration controller document ID [" + documentId + "]");

      FileConcurrencyController fileConcurrencyController =
          documentCollaborationController.getFileConcurrencyController();
      int remainingAcks = computeRemainingAcks(fileConcurrencyController);
      if (remainingAcks > 0) {
        remainingAcksByDocumentId.put(documentId, remainingAcks);
        remover.track(
            fileConcurrencyController.getDocOpListenerRegistrar().add(callback.docOpListener));
      }
    }
   
    callback.initialize(remover, remainingAcksByDocumentId);
View Full Code Here


  private ParticipantModel participantModel;
  private CodePanelBundle codePanelBundle;

  public WorkspacePlaceNavigationHandler(AppContext appContext) {
    this.appContext = appContext;
    this.keyListenerRemoverManager = new RemoverManager();
    this.searchIndex = TreeWalkFileNameSearchImpl.create();  
  }
View Full Code Here

  private WorkspacePlace workspacePlace;
  private DemoView view;

  public DemoController(AppContext context) {
    this.appContext = context;
    this.keyListenerRemoverManager = new RemoverManager();
    this.searchIndex = TreeWalkFileNameSearchImpl.create();
    PublicServices.registerService(LauncherService.class,
        new PublicService.DefaultServiceProvider<LauncherService>(LauncherService.class, this)
        );
  }
View Full Code Here

TOP

Related Classes of com.google.collide.shared.util.ListenerRegistrar.RemoverManager

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.