package io.perfmark.impl;

public abstract class Generator {
  public static final int GEN_OFFSET = 8;
  public static final long FAILURE = -2L << GEN_OFFSET;

  protected Generator() {}

  public abstract void setGeneration(long generation);

  public abstract long getGeneration();
}

@@ -24,224 +24,1621 @@
 l;%0A%0A
-public abstract class Generator %7B%0A  public static final int GEN_OFFSET = 8;%0A  public static final long FAILURE = -2L %3C%3C GEN_OFFSET;%0A%0A  protected Generator() %7B%7D%0A%0A  public abstract void setGeneration(long generation);%0A
+import javax.annotation.concurrent.NotThreadSafe;%0A%0A/**%0A * A Generator keeps track of what generation the PerfMark library is on.  A generation is a way to%0A * group PerfMark recorded tasks and links together.  This allows dynamically enabling and%0A * disabling PerfMark.   Each time the library is enabled, a new generation is started and%0A * associated with all the recorded data.%0A *%0A * %3Cp%3ENormal users are not expected to use this class.%0A */%0A@NotThreadSafe%0Apublic abstract class Generator %7B%0A  /**%0A   * The number of reserved bits at the bottom of the generation.   All generations should be%0A   * left-shifted by this amount.%0A   */%0A  public static final int GEN_OFFSET = 8;%0A  /**%0A   * Represents a failure to enable PerfMark library.  This can be used by subclasses to indicate%0A   * a previous failure to set the generation.  It can also be used to indicate the generation count%0A   * has overflowed.%0A   */%0A  public static final long FAILURE = -2L %3C%3C GEN_OFFSET;%0A%0A  protected Generator() %7B%7D%0A%0A  /**%0A   * Sets the current generation count.  This should be eventually noticeable for callers of%0A   * %7B@link #getGeneration()%7D.  An odd number means the library is enabled, while an even number%0A   * means the library is disabled.%0A   *%0A   * @param generation the generation id, shifted left by %7B@link #GEN_OFFSET%7D.%0A   */%0A  public abstract void setGeneration(long generation);%0A%0A  /**%0A   * Gets the current generation, shifted left by %7B@link #GEN_OFFSET%7D.  An odd number means the%0A   * library is enabled, while an even number means the library is disabled.%0A   *%0A   * @return the current generation or %7B@link #FAILURE%7D.%0A   */
 %0A  p

add Generator docs