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

How to use
IndexCollection
in
com.oberasoftware.jasdb.rest.model

Best Java code snippets using com.oberasoftware.jasdb.rest.model.IndexCollection (Showing top 2 results out of 315)

origin: oberasoftware/jasdb

private RestEntity loadIndexes(String instanceId, String bagName) throws JasDBException {
  IndexManager indexManager = getIndexManager(instanceId);
  StatRecord getIndexCounter = StatisticsMonitor.createRecord("getIndexes");
  Map<String, Index> indexes = indexManager.getIndexes(bagName);
  getIndexCounter.stop();
  List<IndexEntry> indexEntries = new ArrayList<>(indexes.size());
  for(Index index : indexes.values()) {
    KeyInfo keyInfo = index.getKeyInfo();
    IndexEntry entry = new IndexEntry(keyInfo.getKeyName(), keyInfo.keyAsHeader(), keyInfo.valueAsHeader(), index.hasUniqueConstraint(), index.getIndexType());
    entry.setMemorySize(index.getMemoryManager().getTotalMemoryUsage());
    indexEntries.add(entry);
  }
  return new IndexCollection(indexEntries);
}
origin: oberasoftware/jasdb

@Override
public List<IndexDefinition> getIndexDefinitions(RemotingContext context, String instance, String bag) throws RemoteException {
  String connectionString = new RestConnectionBuilder().instance(instance).bag(bag).indexes().getConnectionString();
  ClientResponse clientResponse = doRequest(context, connectionString);
  try {
    IndexCollection indexCollection = new JsonRestResponseHandler().deserialize(IndexCollection.class, clientResponse.getEntityInputStream());
    List<IndexDefinition> indexDefinitions = new ArrayList<>();
    for(IndexEntry entry : indexCollection.getIndexEntryList()) {
      indexDefinitions.add(IndexModelMapper.map(entry));
    }
    return indexDefinitions;
  } catch(RestException e) {
    throw new RemoteException("Unable to parse remote index definitions", e);
  } finally {
    clientResponse.close();
  }
}
com.oberasoftware.jasdb.rest.modelIndexCollection

Most used methods

  • <init>
  • getIndexEntryList

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Menu (java.awt)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • From CI to AI: The AI layer in your organization
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