/* * Copyright DataStax, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ 'use strict'; const util = require('util'); const events = require('events'); /** * Creates a new instance of DataCollection * @param {String} name Name of the data object. * @classdesc Describes a table or a view * @alias module:metadata~DataCollection * @constructor * @abstract */ function DataCollection(name) { events.EventEmitter.call(this); this.setMaxListeners(0); //private Object.defineProperty(this, 'loading', { value: false, enumerable: false, writable: true }); Object.defineProperty(this, 'loaded', { value: false, enumerable: false, writable: true }); /** * Name of the object * @type {String} */ this.name = name; /** * False-positive probability for SSTable Bloom filters. * @type {number} */ this.bloomFilterFalsePositiveChance = 0; /** * Level of caching: all, keys_only, rows_only, none * @type {String} */ this.caching = null; /** * A human readable comment describing the table. * @type {String} */ this.comment = null; /** * Specifies the time to wait before garbage collecting tombstones (deletion markers) * @type {number} */ this.gcGraceSeconds = 0; /** * Compaction strategy class used for the table. * @type {String} */ this.compactionClass = null; /** * Associative-array containing the compaction options keys and values. * @type {Object} */ this.compactionOptions = null; /** * Associative-array containing the compression options. * @type {Object} */ this.compression = null; /** * Specifies the probability of read repairs being invoked over all replicas in the current data center. * @type {number} */ this.localReadRepairChance = 0; /** * Specifies the probability with which read repairs should be invoked on non-quorum reads. The value must be * between 0 and 1. * @type {number} */ this.readRepairChance = 0; /** * An associative Array containing extra metadata for the table. *
* For Apache Cassandra versions prior to 3.0.0, this method always returns null
.
*
* For Apache Cassandra versions prior to 3.0.0, this method always returns null
.
*
* Note: this option is available in Apache Cassandra 2.1 and above, and will return null
for
* earlier versions.
*
* Note: this option is available in Apache Cassandra 2.1 and above, and will return null
for
* earlier versions.
*
* For DSE versions prior to 6.0.0, this method always returns {@code null}. If nodesync * was not explicitly configured for this table this method will also return {@code null}. *
* @type {Object} */ this.nodesync = null; } util.inherits(DataCollection, events.EventEmitter); module.exports = DataCollection;