Tabnine Logo
IndexOptions.isBackground
Code IndexAdd Tabnine to your IDE (free)

How to use
isBackground
method
in
com.mongodb.client.model.IndexOptions

Best Java code snippets using com.mongodb.client.model.IndexOptions.isBackground (Showing top 5 results out of 315)

origin: MorphiaOrg/morphia

@Test
public void indexOptionsConversion() {
  IndexOptionsBuilder indexOptions = indexOptions();
  com.mongodb.client.model.IndexOptions options = indexHelper.convert(indexOptions, false);
  assertEquals("index_name", options.getName());
  assertTrue(options.isBackground());
  assertTrue(options.isUnique());
  assertTrue(options.isSparse());
  assertEquals(Long.valueOf(42), options.getExpireAfter(TimeUnit.SECONDS));
  assertEquals("en", options.getDefaultLanguage());
  assertEquals("de", options.getLanguageOverride());
  assertEquals(indexHelper.convert(indexOptions.collation()), options.getCollation());
  assertTrue(indexHelper.convert(indexOptions, true).isBackground());
  assertTrue(indexHelper.convert(indexOptions.background(false), true).isBackground());
  assertTrue(indexHelper.convert(indexOptions.background(true), true).isBackground());
  assertTrue(indexHelper.convert(indexOptions.background(true), false).isBackground());
  assertFalse(indexHelper.convert(indexOptions.background(false), false).isBackground());
}
origin: org.mongodb/mongo-java-driver

.background(model.getOptions().isBackground())
.unique(model.getOptions().isUnique())
.sparse(model.getOptions().isSparse())
origin: jphp-group/jphp

@Override
public Memory unconvert(Environment env, TraceInfo trace, IndexOptions arg) throws Throwable {
  if (arg == null) return Memory.NULL;
  ArrayMemory options = ArrayMemory.createHashed(12);
  options.put("name", arg.getName());
  options.put("background", arg.isBackground());
  options.put("sparse", arg.isSparse());
  options.put("unique", arg.isUnique());
  if (arg.getDefaultLanguage() != null) options.put("defaultLanguage", arg.getDefaultLanguage());
  if (arg.getBits() != null) options.put("bits", arg.getBits());
  if (arg.getMax() != null) options.put("max", arg.getMax());
  if (arg.getMin() != null) options.put("min", arg.getMin());
  if (arg.getLanguageOverride() != null) options.put("languageOverride", arg.getLanguageOverride());
  if (arg.getVersion() != null) options.put("version", arg.getVersion());
  if (arg.getTextVersion() != null) options.put("textVersion", arg.getTextVersion());
  if (arg.getSphereVersion() != null) options.put("sphereVersion", arg.getSphereVersion());
  return options;
}
origin: org.wso2.extension.siddhi.store.mongodb/siddhi-store-mongodb

indexOptionsMap.put("background", expectedIndexOptions.isBackground());
indexOptionsMap.put("sparse", expectedIndexOptions.isSparse());
indexOptionsMap.put("expireAfterSeconds", expectedIndexOptions.getExpireAfter(TimeUnit.SECONDS));
origin: org.mongodb/mongodb-driver-core

.background(model.getOptions().isBackground())
.unique(model.getOptions().isUnique())
.sparse(model.getOptions().isSparse())
com.mongodb.client.modelIndexOptionsisBackground

Javadoc

Create the index in the background

Popular methods of IndexOptions

  • <init>
  • unique
    Should the index should be unique.
  • name
    Sets the name of the index.
  • background
    Should the index should be created in the background
  • expireAfter
    Sets the time to live for documents in the collection
  • sparse
    Should the index only references documents with the specified field
  • partialFilterExpression
    Sets the filter expression for the documents to be included in the index
  • defaultLanguage
    Sets the language for the text index.The language that determines the list of stop words and the rul
  • languageOverride
    Sets the name of the field that contains the language string.For text indexes, the name of the field
  • weights
    Sets the weighting object for use with a text index.An document that represents field and weight pai
  • bits
    Sets the number of precision of the stored geohash value of the location data in 2d indexes.
  • getName
    Gets the name of the index.
  • bits,
  • getName,
  • isUnique,
  • max,
  • min,
  • sphereVersion,
  • bucketSize,
  • collation,
  • getDefaultLanguage,
  • getLanguageOverride

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • CodeWhisperer alternatives
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