Tabnine Logo
HollowProducerListener$RestoreStatus
Code IndexAdd Tabnine to your IDE (free)

How to use
HollowProducerListener$RestoreStatus
in
com.netflix.hollow.api.producer

Best Java code snippets using com.netflix.hollow.api.producer.HollowProducerListener$RestoreStatus (Showing top 4 results out of 315)

origin: Netflix/hollow

@Override
default void onProducerRestoreComplete(com.netflix.hollow.api.producer.Status status, long versionDesired, long versionReached, Duration elapsed) {
  onProducerRestoreComplete(new RestoreStatus(status, versionDesired, versionReached),
      elapsed.toMillis(), TimeUnit.MILLISECONDS);
}
origin: Netflix/hollow

private void restoreAndAssert(HollowProducer producer, long version, int size, int valueMultiplier, int valueFieldCount) {
  ReadState readState = producer.restore(version, blobRetriever);
  Assert.assertNotNull(lastRestoreStatus);
  Assert.assertEquals(Status.SUCCESS, lastRestoreStatus.getStatus());
  Assert.assertEquals("Version should be the same", version, lastRestoreStatus.getDesiredVersion());
  HollowObjectTypeReadState typeState = (HollowObjectTypeReadState) readState.getStateEngine().getTypeState("TestPojo");
  BitSet populatedOrdinals = typeState.getPopulatedOrdinals();
  Assert.assertEquals(size, populatedOrdinals.cardinality());
  int ordinal = populatedOrdinals.nextSetBit(0);
  while (ordinal != -1) {
    GenericHollowObject obj = new GenericHollowObject(new HollowObjectGenericDelegate(typeState), ordinal);
    System.out.println("ordinal=" + ordinal + obj);
    int id = obj.getInt("id");
    for (int i = 0; i < valueFieldCount; i++) {
      String valueFN = "v" + (i + 1);
      int value = id * valueMultiplier;
      Assert.assertEquals(valueFN, value, obj.getInt(valueFN));
    }
    ordinal = populatedOrdinals.nextSetBit(ordinal + 1);
  }
  System.out.println("Asserted Correctness of version:" + version + "\n\n");
}
origin: Netflix/hollow

@Test
public void testRestoreFailure() {
  HollowProducer producer = createProducer(tmpFolder, schema);
  long fakeVersion = 101;
  try {
    producer.restore(fakeVersion, blobRetriever);
    Assert.fail();
  } catch(Exception expected) { }
  Assert.assertNotNull(lastRestoreStatus);
  Assert.assertEquals(Status.FAIL, lastRestoreStatus.getStatus());
}
origin: Netflix/hollow

@Test
public void testPublishAndRestore() {
  HollowProducer producer = createProducer(tmpFolder, schema);
  long version = testPublishV1(producer, 2, 10);
  producer.restore(version, blobRetriever);
  Assert.assertNotNull(lastRestoreStatus);
  Assert.assertEquals(Status.SUCCESS, lastRestoreStatus.getStatus());
  Assert.assertEquals("Version should be the same", version, lastRestoreStatus.getDesiredVersion());
}
com.netflix.hollow.api.producerHollowProducerListener$RestoreStatus

Javadoc

This class represents information on details when HollowProducer has finished executing a particular stage. An instance of this class is provided on different events of HollowProducerListener.

Most used methods

  • <init>
  • getDesiredVersion
    The version desired to restore to when calling HollowProducer#restore(long,com.netflix.hollow.api.co
  • getStatus
    Status of the restore

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JFileChooser (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now