com.mongodb
Class TaggableReadPreference

java.lang.Object
  extended by com.mongodb.ReadPreference
      extended by com.mongodb.TaggableReadPreference

public abstract class TaggableReadPreference
extends ReadPreference

Abstract base class for all preference which can be combined with tags

Author:
breinero

Nested Class Summary
 
Nested classes/interfaces inherited from class com.mongodb.ReadPreference
ReadPreference.TaggedReadPreference
 
Field Summary
 
Fields inherited from class com.mongodb.ReadPreference
PRIMARY, SECONDARY
 
Method Summary
 boolean equals(Object o)
           
 List<DBObject> getTagSets()
           
 int hashCode()
           
 boolean isSlaveOk()
           
 DBObject toDBObject()
           
 String toString()
           
 
Methods inherited from class com.mongodb.ReadPreference
getName, nearest, nearest, primary, primaryPreferred, primaryPreferred, secondary, secondary, secondaryPreferred, secondaryPreferred, valueOf, valueOf, withTags, withTags
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isSlaveOk

public boolean isSlaveOk()
Specified by:
isSlaveOk in class ReadPreference
Returns:
true if this preference allows reads or commands from secondary nodes

toDBObject

public DBObject toDBObject()
Specified by:
toDBObject in class ReadPreference
Returns:
DBObject representation of this preference

getTagSets

public List<DBObject> getTagSets()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object