Tabnine Logo
HollowTypeDataAccess
Code IndexAdd Tabnine to your IDE (free)

How to use
HollowTypeDataAccess
in
com.netflix.hollow.core.read.dataaccess

Best Java code snippets using com.netflix.hollow.core.read.dataaccess.HollowTypeDataAccess (Showing top 20 results out of 315)

origin: Netflix/hollow

public String getObjectType() {
  if(objectType != null)
    return objectType;
  return dataAccess.getSchema().getName();
}

origin: Netflix/hollow

@Override
public HollowTypeReadState getTypeState() {
  return currentDataAccess.getTypeState();
}
origin: Netflix/hollow

public HollowDataAccess getDataAccess() {
  return typeDataAccess.getDataAccess();
}
origin: Netflix/hollow

@Override
public void ignoreUpdateThreadForSampling(Thread t) {
  currentDataAccess.ignoreUpdateThreadForSampling(t);
}
origin: Netflix/hollow

public void setFieldSpecificSamplingDirector(HollowFilterConfig fieldSpec, HollowSamplingDirector director) {
  typeDataAccess.setFieldSpecificSamplingDirector(fieldSpec, director);
}

origin: Netflix/hollow

@Override
public void setSamplingDirector(HollowSamplingDirector director) {
  currentDataAccess.setSamplingDirector(director);
}

origin: Netflix/hollow

@Override
public HollowSampler getSampler() {
  return currentDataAccess.getSampler();
}
origin: Netflix/hollow

public void ignoreUpdateThreadForSampling(Thread t) {
  typeDataAccess.ignoreUpdateThreadForSampling(t);
}
origin: Netflix/hollow

@Override
public void setFieldSpecificSamplingDirector(HollowFilterConfig fieldSpec, HollowSamplingDirector director) {
  currentDataAccess.setFieldSpecificSamplingDirector(fieldSpec, director);
}

origin: Netflix/hollow

public void setSamplingDirector(HollowSamplingDirector samplingDirector) {
  typeDataAccess.setSamplingDirector(samplingDirector);
}

origin: Netflix/hollow

public Collection<SampleResult> getAccessSampleResults() {
  return typeDataAccess.getSampler().getSampleResults();
}
origin: Netflix/hollow

public HollowObjectCacheProvider(HollowTypeDataAccess typeDataAccess, HollowTypeAPI typeAPI, HollowFactory<T> factory, HollowObjectCacheProvider<T> previous) {
  if(typeDataAccess != null) {
    PopulatedOrdinalListener listener = typeDataAccess.getTypeState().getListener(PopulatedOrdinalListener.class);
    BitSet populatedOrdinals = listener.getPopulatedOrdinals();
    BitSet previousOrdinals = listener.getPreviousOrdinals();
    int length = Math.max(populatedOrdinals.length(), previousOrdinals.length());
    List<T> arr = new ArrayList<T>(length);
    for(int ordinal = 0; ordinal < length; ordinal++) {
      while(ordinal >= arr.size())
        arr.add(null);
      if(previous != null && previousOrdinals.get(ordinal) && populatedOrdinals.get(ordinal)) {
        T cached = previous.getHollowObject(ordinal);
        arr.set(ordinal, cached);
        if(cached instanceof HollowRecord)
          ((HollowCachedDelegate)((HollowRecord)cached).getDelegate()).updateTypeAPI(typeAPI);
      } else if(populatedOrdinals.get(ordinal)){
        arr.set(ordinal, instantiateCachedObject(factory, typeDataAccess, typeAPI, ordinal));
      }
    }
    if(typeDataAccess instanceof HollowTypeReadState) {
      this.factory = factory;
      this.typeAPI = typeAPI;
      this.typeReadState = (HollowTypeReadState)typeDataAccess;
      this.typeReadState.addListener(this);
    }
    this.cachedItems = arr;
  } else {
    this.cachedItems = Collections.emptyList();
  }
}
origin: Netflix/hollow

@Override
public HollowSchema getSchema(String name) {
  return getTypeDataAccess(name).getSchema();
}
origin: Netflix/hollow

@Override
public String stringify(HollowRecord record) {
  return stringify(record.getTypeDataAccess().getDataAccess(),
      record.getSchema().getName(), record.getOrdinal());
}
origin: Netflix/hollow

  @Override
  public GenericHollowObject getRecord(int ordinal) {
    HollowObjectTypeReadState typeState = (HollowObjectTypeReadState) rStateEngine.getTypeDataAccess(type).getTypeState();
    GenericHollowObject obj = new GenericHollowObject(new HollowObjectGenericDelegate(typeState), ordinal);
    return obj;
  }
}
origin: Netflix/hollow

@Override
public HollowSchema getSchema() {
  return dataAccess.getSchema();
}
origin: Netflix/hollow

@Override
public void stringify(Writer writer, HollowRecord record) throws IOException {
  stringify(writer, record.getTypeDataAccess().getDataAccess(), record.getSchema().getName(),
      record.getOrdinal());
}
origin: Netflix/hollow

protected void computeDataChange(String type, HollowReadStateEngine stateEngine, PrimaryKey primaryKey) {
  HollowTypeReadState typeState = stateEngine.getTypeDataAccess(type).getTypeState();
origin: Netflix/hollow

private HollowTypeDataAccess getChildDataAccess(HollowTypeDataAccess typeDataAccess, String childName) {
  if(typeDataAccess instanceof HollowObjectTypeDataAccess) {
    HollowObjectSchema schema = (HollowObjectSchema) typeDataAccess.getSchema();
    int fieldIdx = schema.getPosition(childName);
    String childType = schema.getReferencedType(fieldIdx);
    return dataAccess.getTypeDataAccess(childType);
  } else if(typeDataAccess instanceof HollowCollectionTypeDataAccess) {
    HollowCollectionSchema schema = (HollowCollectionSchema) typeDataAccess.getSchema();
    return dataAccess.getTypeDataAccess(schema.getElementType());
  } else if(typeDataAccess instanceof HollowMapTypeDataAccess) {
    HollowMapSchema schema = (HollowMapSchema) typeDataAccess.getSchema();
    String childType = "key".equals(childName) ? schema.getKeyType() : schema.getValueType();
    return dataAccess.getTypeDataAccess(childType);
  }
  throw new IllegalArgumentException("I can't create a child node for a " + typeDataAccess.getClass());
}
origin: Netflix/hollow

@Override
public void stringify(Writer writer, HollowRecord record) throws IOException {
  stringify(writer, record.getTypeDataAccess().getDataAccess(), record.getSchema().getName(), record.getOrdinal());
}
com.netflix.hollow.core.read.dataaccessHollowTypeDataAccess

Javadoc

A handle for all of the records of a specific type in a Hollow dataset. The most common type of HollowTypeDataAccessis a HollowTypeReadState.

Most used methods

  • getSchema
  • getTypeState
    Optional operation
  • getDataAccess
  • getSampler
  • ignoreUpdateThreadForSampling
  • setFieldSpecificSamplingDirector
  • setSamplingDirector

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 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