private Pair<AtomicInteger, ConcurrentLinkedQueue<RowMutation>> getMutationQueue(String indexName) { Pair<AtomicInteger, ConcurrentLinkedQueue<RowMutation>> mutationQ = mutationList.get(indexName); if (mutationQ == null) { mutationQ = new Pair<AtomicInteger, ConcurrentLinkedQueue<RowMutation>>(new AtomicInteger(0), new ConcurrentLinkedQueue<RowMutation>()); Pair<AtomicInteger, ConcurrentLinkedQueue<RowMutation>> liveQ = mutationList .putIfAbsent(indexName, mutationQ); if (liveQ != null) mutationQ = liveQ; } return mutationQ; }
DataType(int id, AbstractType type, ProtocolVersion protocolVersion) { this.id = id; this.type = type; this.protocolVersion = protocolVersion; pair = Pair.create(this, null); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CounterCacheKey)) return false; CounterCacheKey cck = (CounterCacheKey) o; return ksAndCFName.equals(cck.ksAndCFName) && Arrays.equals(partitionKey, cck.partitionKey) && Arrays.equals(cellName, cck.cellName); } }
@Override public int hashCode() { int result = ksAndCFName.hashCode(); result = 31 * result + (key != null ? Arrays.hashCode(key) : 0); return result; }
DataType(int id, AbstractType type, ProtocolVersion protocolVersion) { this.id = id; this.type = type; this.protocolVersion = protocolVersion; pair = Pair.create(this, null); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RowCacheKey that = (RowCacheKey) o; return ksAndCFName.equals(that.ksAndCFName) && Arrays.equals(key, that.key); }
@Override public int hashCode() { int result = ksAndCFName.hashCode(); result = 31 * result + (key != null ? Arrays.hashCode(key) : 0); return result; }
public Builder addStaticColumn(ColumnIdentifier name, AbstractType type) { this.staticColumns.add(Pair.create(name, type)); return this; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RowCacheKey that = (RowCacheKey) o; return ksAndCFName.equals(that.ksAndCFName) && Arrays.equals(key, that.key); }
public static <X, Y> Pair<X, Y> create(X x, Y y) { return new Pair<X, Y>(x, y); } }
@Override public int hashCode() { int result = ksAndCFName.hashCode(); result = 31 * result + (key != null ? Arrays.hashCode(key) : 0); return result; }
public Builder addPartitionKey(ColumnIdentifier name, AbstractType type) { this.partitionKeys.add(Pair.create(name, type)); return this; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RowCacheKey that = (RowCacheKey) o; return ksAndCFName.equals(that.ksAndCFName) && Arrays.equals(key, that.key); }
public static <X, Y> Pair<X, Y> create(X x, Y y) { return new Pair<X, Y>(x, y); } }
@Override public int hashCode() { int result = ksAndCFName.hashCode(); result = 31 * result + (key != null ? Arrays.hashCode(key) : 0); return result; }
public Builder addClusteringColumn(ColumnIdentifier name, AbstractType type) { this.clusteringColumns.add(Pair.create(name, type)); return this; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RowCacheKey that = (RowCacheKey) o; return ksAndCFName.equals(that.ksAndCFName) && Arrays.equals(key, that.key); }
public static <X, Y> Pair<X, Y> create(X x, Y y) { return new Pair<X, Y>(x, y); } }
@Override public int hashCode() { int result = ksAndCFName.hashCode(); result = 31 * result + desc.hashCode(); result = 31 * result + Arrays.hashCode(key); return result; } }
public Builder addClusteringColumn(ColumnIdentifier name, AbstractType type) { this.clusteringColumns.add(Pair.create(name, type)); return this; }