Example usage for com.mongodb ReadPreference valueOf

List of usage examples for com.mongodb ReadPreference valueOf

Introduction

In this page you can find the example usage for com.mongodb ReadPreference valueOf.

Prototype

public static TaggableReadPreference valueOf(final String name, final List<TagSet> tagSetList) 

Source Link

Document

Creates a taggable read preference from the given read preference name and list of tag sets.

Usage

From source file:com.edgytech.umongo.OptionDialog.java

License:Apache License

ReadPreference getReadPreference() {
    ComboBox readBox = (ComboBox) getBoundUnit(Item.rpPreference);
    ReadPref rpEnm = ReadPref.values()[readBox.value];
    BasicDBObject tag = (BasicDBObject) ((DocBuilderField) getBoundComponentUnit(Item.rpTag)).getDBObject();
    if (tag != null)
        return ReadPreference.valueOf(rpEnm.name(), tag);
    return ReadPreference.valueOf(rpEnm.name());
}