API Reference 0.4.0couchclientBucket

Bucket class

Bucket configuration.

class Bucket {
 String name; //Bucket name
 Config config; //configuration
 Uri streamingUri; //bucket's streaming uri
 bool isNotUpdating;
 List<Node> nodes;
 Logger _logger;

 Bucket(this.name, this.config, this.streamingUri, this.nodes)
     : isNotUpdating = false {

   _logger = initLogger('couchclient.config', this);
 }

 void setIsNotUpdating() {
   isNotUpdating = true;
   _logger.finest("Marking bucket as not updating,"
       " disconnected from config stream");
 }

 String toString() => "$name: $config, $nodes";

 @override
 int get hashCode {
   int h = name.hashCode;
   h = 31 * h + config.hashCode;
   h = 31 * h + listHashCode(nodes);
   return h & 0xffffffff;
 }

 bool operator ==(other) {
   if (identical(this, other)) return true;
   if (other is! Bucket) return false;
   return this.name == other.name
       && this.config == other.config
       && listEquals(this.nodes, other.nodes);
 }
}

Constructors

new Bucket(String name, Config config, Uri streamingUri, List<Node> nodes) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
Bucket(this.name, this.config, this.streamingUri, this.nodes)
   : isNotUpdating = false {

 _logger = initLogger('couchclient.config', this);
}

Properties

Config config #

Config config

final int hashCode #

Get a hash code for this object.

All objects have hash codes. Hash codes are guaranteed to be the same for objects that are equal when compared using the equality operator ==. Other than that there are no guarantees about the hash codes. They will not be consistent between runs and there are no distribution guarantees.

If a subclass overrides hashCode it should override the equality operator as well to maintain consistency.

docs inherited from Object
@override
int get hashCode {
 int h = name.hashCode;
 h = 31 * h + config.hashCode;
 h = 31 * h + listHashCode(nodes);
 return h & 0xffffffff;
}

bool isNotUpdating #

bool isNotUpdating

String name #

String name

List<Node> nodes #

List<Node> nodes

Uri streamingUri #

Uri streamingUri

Operators

bool operator ==(other) #

The equality operator.

The default behavior for all Objects is to return true if and only if this and other are the same object.

If a subclass overrides the equality operator it should override the hashCode method as well to maintain consistency.

docs inherited from Object
bool operator ==(other) {
 if (identical(this, other)) return true;
 if (other is! Bucket) return false;
 return this.name == other.name
     && this.config == other.config
     && listEquals(this.nodes, other.nodes);
}

Methods

void setIsNotUpdating() #

void setIsNotUpdating() {
 isNotUpdating = true;
 _logger.finest("Marking bucket as not updating,"
     " disconnected from config stream");
}

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() => "$name: $config, $nodes";