You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Greene (JIRA)" <ji...@apache.org> on 2009/07/21 15:41:15 UTC
[jira] Issue Comment Edited: (CASSANDRA-300) Enumerate useful
consistency options for read/write calls
[ https://issues.apache.org/jira/browse/CASSANDRA-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733617#action_12733617 ]
Michael Greene edited comment on CASSANDRA-300 at 7/21/09 6:41 AM:
-------------------------------------------------------------------
You can specify defaults to struct values, but I'm not sure about default method parameters -- few languages support this functionality, so I doubt it. It may be premature generalization, but the second option would allow you to have a default:
struct ConsistencyRequest {
1: required ConsistencyLevel level = ONE,
2: optional int nodes,
}
read(1: string thing, 2: ConsistencyRequest request)
was (Author: euphoria):
You can specify defaults to struct values, but I'm not sure about default method parameters -- few languages support this functionality, so I doubt it. It may be premature generalization, but the second option would allow you to have a default:
struct ConsistencyRequest {
1: required ConsistencyLevel level = ONE,
2: optional int nodes,
}
read(1: string thing, 2: ConsistencyRequest)
> Enumerate useful consistency options for read/write calls
> ---------------------------------------------------------
>
> Key: CASSANDRA-300
> URL: https://issues.apache.org/jira/browse/CASSANDRA-300
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Michael Greene
>
> Currently, a user has to specify an int for the number of nodes to block_for. As discussed on IRC, there are only a few options that a user would want, so this would be better encapsulated by an enum.
> enum ConsistencyLevel {
> ZERO = 0,
> ONE = 1,
> QUORUM = 2,
> ALL = 3,
> }
> This could be extended with a fifth option, CUSTOM = 4, if custom specifications are desired
> struct ConsistencyRequest {
> 1: required ConsistencyLevel level,
> 2: optional int nodes
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.