All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.almworks.jira.structure.api.effectbatch.EffectBatch Maven / Gradle / Ivy

There is a newer version: 17.25.3
Show newest version
package com.almworks.jira.structure.api.effectbatch;

import com.almworks.integers.LongIterable;
import com.almworks.jira.structure.api.auth.StructureAuth;
import com.almworks.jira.structure.api.forest.ForestSpec;
import com.almworks.jira.structure.api.pull.DataVersion;
import com.atlassian.annotations.Internal;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

@Internal
public class EffectBatch {
  @NotNull public final ForestSpec spec;
  @NotNull public final DataVersion version;
  @NotNull public final LongIterable movedRows;
  @NotNull public final List effects;
  @Nullable public final RowsToReplace redoReplace;
  @Nullable public final RowsToReplace undoReplace;

  @NotNull
  public EffectState state;
  public long timestamp;
  public final String userKey;

  public EffectBatch(@NotNull ForestSpec spec, @NotNull DataVersion version, @NotNull LongIterable movedRows, @Nullable RowsToReplace redoReplace, @Nullable RowsToReplace undoReplace, @NotNull List effects) {
    this.spec = spec;
    this.version = version;
    this.movedRows = movedRows;
    this.redoReplace = redoReplace;
    this.undoReplace = undoReplace;
    this.effects = effects;
    this.state = EffectState.APPLIED;
    this.timestamp = System.nanoTime();
    this.userKey = StructureAuth.getUserKey();
  }

  public long getTimestamp() {
    return timestamp;
  }

  public String getUserKey() {
    return userKey;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy