Examples of SaveQuota


Examples of org.apache.aurora.gen.storage.SaveQuota

    new MutationFixture() {
      @Override
      protected void setupExpectations() throws Exception {
        storageUtil.expectWriteOperation();
        storageUtil.quotaStore.saveQuota(role, quota);
        streamMatcher.expectTransaction(Op.saveQuota(new SaveQuota(role, quota.newBuilder())))
            .andReturn(position);
      }

      @Override
      protected void performMutations(MutableStoreProvider storeProvider) {
View Full Code Here

Examples of org.apache.aurora.gen.storage.SaveQuota

  @Override
  public void saveQuota(final String role, final IResourceAggregate quota) {
    requireNonNull(role);
    requireNonNull(quota);

    write(Op.saveQuota(new SaveQuota(role, quota.newBuilder())));
    quotaStore.saveQuota(role, quota);
  }
View Full Code Here

Examples of org.apache.aurora.gen.storage.SaveQuota

      case REMOVE_TASKS:
        writeBehindTaskStore.deleteTasks(op.getRemoveTasks().getTaskIds());
        break;

      case SAVE_QUOTA:
        SaveQuota saveQuota = op.getSaveQuota();
        writeBehindQuotaStore.saveQuota(
            saveQuota.getRole(),
            IResourceAggregate.build(saveQuota.getQuota()));
        break;

      case REMOVE_QUOTA:
        writeBehindQuotaStore.removeQuota(op.getRemoveQuota().getRole());
        break;
View Full Code Here

Examples of org.apache.aurora.gen.storage.SaveQuota

          }
        })
        .put(Op._Fields.SAVE_QUOTA, new Closure<Op>() {
          @Override
          public void execute(Op op) throws RuntimeException {
            SaveQuota saveQuota = op.getSaveQuota();
            writeBehindQuotaStore.saveQuota(
                saveQuota.getRole(),
                IResourceAggregate.build(saveQuota.getQuota()));
          }
        })
        .put(Op._Fields.REMOVE_QUOTA, new Closure<Op>() {
          @Override
          public void execute(Op op) throws RuntimeException {
View Full Code Here

Examples of org.apache.aurora.gen.storage.SaveQuota

    RemoveTasks removeTasks = new RemoveTasks(ImmutableSet.of("taskId1"));
    builder.add(createTransaction(Op.removeTasks(removeTasks)));
    storageUtil.taskStore.deleteTasks(removeTasks.getTaskIds());

    SaveQuota saveQuota = new SaveQuota(JOB_KEY.getRole(), new ResourceAggregate());
    builder.add(createTransaction(Op.saveQuota(saveQuota)));
    storageUtil.quotaStore.saveQuota(
        saveQuota.getRole(),
        IResourceAggregate.build(saveQuota.getQuota()));

    builder.add(createTransaction(Op.removeQuota(new RemoveQuota(JOB_KEY.getRole()))));
    storageUtil.quotaStore.removeQuota(JOB_KEY.getRole());

    // This entry lacks a slave ID, and should therefore be discarded.
View Full Code Here

Examples of org.apache.aurora.gen.storage.SaveQuota

    new MutationFixture() {
      @Override
      protected void setupExpectations() throws Exception {
        storageUtil.expectWriteOperation();
        storageUtil.quotaStore.saveQuota(role, quota);
        streamMatcher.expectTransaction(Op.saveQuota(new SaveQuota(role, quota.newBuilder())))
            .andReturn(position);
      }

      @Override
      protected void performMutations(MutableStoreProvider storeProvider) {
View Full Code Here

Examples of org.apache.aurora.gen.storage.SaveQuota

  @Override
  public void saveQuota(final String role, final IResourceAggregate quota) {
    requireNonNull(role);
    requireNonNull(quota);

    write(Op.saveQuota(new SaveQuota(role, quota.newBuilder())));
    quotaStore.saveQuota(role, quota);
  }
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.