congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ObjectIdentityOrdinalMap$Segment.index
Code IndexAdd Tabnine to your IDE (free)

How to use
index
method
in
com.netflix.hollow.zenoadapter.util.ObjectIdentityOrdinalMap$Segment

Best Java code snippets using com.netflix.hollow.zenoadapter.util.ObjectIdentityOrdinalMap$Segment.index (Showing top 3 results out of 315)

origin: Netflix/hollow

public synchronized void put(Object object, int hashCode, int ordinal) {
  int index = index(hashCode, entries.length);
  Entry current = entries[index];
  Entry prev = null;
  while (current != null) {
    if (current.hash() == hashCode) {
      Object currentObject = current.getKey();
      if( currentObject == null){
        deleteEntry(index, current, prev);
        current = current.next;
        continue;
      } else if (currentObject == object) {
        return;
      }
    }
    prev = current;
    current = current.next;
  }
  count++;
  Entry first = entries[index];
  Entry entry = new Entry(object, hashCode, ordinal, first);
  entries[index] = entry;
  entry.next = first;
  checkSize();
  return;
}
origin: Netflix/hollow

public synchronized Entry get(Object object, int hashCode) {
  int index = index(hashCode, entries.length);
  Entry current = entries[index];
  Entry prev = null;
  while (current != null) {
    if (current.hash() == hashCode) {
      Object currentObject = current.getKey();
      if( currentObject == null){
        deleteEntry(index, current, prev);
        current = current.next;
        continue;
      } else if (currentObject == object) {
        return current;
      }
    }
    prev = current;
    current = current.next;
  }
  return null;
}
origin: Netflix/hollow

private void resize(int newCapacity) {
  Entry[] newEntries = new Entry[newCapacity];
  if( entries != null){
    for(Entry entry : entries){
      Entry current = entry;
      while(current != null){
        Entry newEntry = current;
        current = current.next;
        int index = index(newEntry.hash(), newEntries.length);
        newEntry.next = newEntries[index];
        newEntries[index] = newEntry;
      }
    }
  }
  minThreshold = (newEntries.length == MINIMUM_CAPACITY) ? 0 : (newEntries.length * LOAD_FACTOR_PERCENT / 200);
  maxThreshold = (newEntries.length == MAXIMUM_CAPACITY) ? Integer.MAX_VALUE : newEntries.length * LOAD_FACTOR_PERCENT / 100;
  entries = newEntries;
}
com.netflix.hollow.zenoadapter.utilObjectIdentityOrdinalMap$Segmentindex

Popular methods of ObjectIdentityOrdinalMap$Segment

  • <init>
  • checkSize
  • clear
  • deleteEntry
  • get
  • put
  • resize
  • size

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top plugins for Android Studio
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