/** * Tests if the key in the table using the <tt>equals</tt> method. * * @return <tt>true</tt> if the key is in the table using the <tt>equals</tt> method * @throws NullPointerException if the specified key is null */ @Override public boolean containsKey(Object key) { return get(key) != null; }
/** * {@inheritDoc} * <p> * <strong>NOTE:</strong> This method deviates from the original * {@link Multimap} interface in that changes to the returned collection * WILL NOT update the underlying multimap and vice-versa. */ @Override public Set<V> get(K key) { Set<V> values = map.get(key); return values != null ? values : emptySet; }
/** Tests if the key in the table using the <tt>equals</tt> method. * @return <tt>true</tt> if the key is in the table using the <tt>equals</tt> method * @throws NullPointerException if the specified key is null */ @Override public boolean containsKey( Object key ) { return get(key) != null; }
/** Tests if the key in the table using the <tt>equals</tt> method. * @return <tt>true</tt> if the key is in the table using the <tt>equals</tt> method * @throws NullPointerException if the specified key is null */ @Override public boolean containsKey( Object key ) { return get(key) != null; }
/** * @param host * @return {@link HostConnectionPool} */ @Override public HostConnectionPool<CL> getHostPool(Host host) { return hosts.get(host); }
@Override public TokenHostConnectionPoolPartition<CL> getPartition(String token) { return tokenToPartitionMap.get(new BigInteger(token)); }
private void writeObject(java.io.ObjectOutputStream s) throws IOException { s.defaultWriteObject(); // Nothing to write for( Object K : keySet() ) { final Object V = get(K); // Do an official 'get' s.writeObject(K); // Write the <TypeK,TypeV> pair s.writeObject(V); } s.writeObject(null); // Sentinel to indicate end-of-data s.writeObject(null); }
/** * @return boolean */ @Override public boolean isHostUp(Host host) { HostConnectionPool<CL> pool = hosts.get(host); if (pool != null) { return !pool.isReconnecting(); } return false; }
private void writeObject(java.io.ObjectOutputStream s) throws IOException { s.defaultWriteObject(); // Nothing to write for (Object K : keySet()) { final Object V = get(K); // Do an official 'get' s.writeObject(K); // Write the <TypeK,TypeV> pair s.writeObject(V); } s.writeObject(null); // Sentinel to indicate end-of-data s.writeObject(null); }
private void writeObject(java.io.ObjectOutputStream s) throws IOException { s.defaultWriteObject(); // Nothing to write for( Object K : keySet() ) { final Object V = get(K); // Do an official 'get' s.writeObject(K); // Write the <TypeK,TypeV> pair s.writeObject(V); } s.writeObject(null); // Sentinel to indicate end-of-data s.writeObject(null); }
private void writeObject(java.io.ObjectOutputStream s) throws IOException { s.defaultWriteObject(); // Nothing to write for( Object K : keySet() ) { final Object V = get(K); // Do an official 'get' s.writeObject(K); // Write the <TypeK,TypeV> pair s.writeObject(V); } s.writeObject(null); // Sentinel to indicate end-of-data s.writeObject(null); }
/** * @return boolean */ @Override public boolean isHostUp(Host host) { HostConnectionPool<CL> pool = hosts.get(host); if (pool != null) { return !pool.isReconnecting(); } return false; }
public String dirtyString() { StringBuilder sb = new StringBuilder(); for (UUID cfId : getDirtyCFIDs()) { CFMetaData m = Schema.instance.getCFMetaData(cfId); sb.append(m == null ? "<deleted>" : m.cfName).append(" (").append(cfId) .append(", dirty: ").append(cfDirty.get(cfId)) .append(", clean: ").append(cfClean.get(cfId)) .append("), "); } return sb.toString(); }
public String dirtyString() { StringBuilder sb = new StringBuilder(); for (UUID cfId : getDirtyCFIDs()) { CFMetaData m = Schema.instance.getCFMetaData(cfId); sb.append(m == null ? "<deleted>" : m.cfName).append(" (").append(cfId) .append(", dirty: ").append(cfDirty.get(cfId)) .append(", clean: ").append(cfClean.get(cfId)) .append("), "); } return sb.toString(); }
public static NoSpamLogger getLogger(Logger logger, long minInterval, TimeUnit unit) { NoSpamLogger wrapped = wrappedLoggers.get(logger); if (wrapped == null) { wrapped = new NoSpamLogger(logger, minInterval, unit); NoSpamLogger temp = wrappedLoggers.putIfAbsent(logger, wrapped); if (temp != null) wrapped = temp; } return wrapped; }
public NoSpamLogStatement getStatement(String key, String s, long minIntervalNanos) { NoSpamLogStatement statement = lastMessage.get(key); if (statement == null) { statement = new NoSpamLogStatement(s, minIntervalNanos); NoSpamLogStatement temp = lastMessage.putIfAbsent(key, statement); if (temp != null) statement = temp; } return statement; } }
public static NoSpamLogger getLogger(Logger logger, long minInterval, TimeUnit unit) { NoSpamLogger wrapped = wrappedLoggers.get(logger); if (wrapped == null) { wrapped = new NoSpamLogger(logger, minInterval, unit); NoSpamLogger temp = wrappedLoggers.putIfAbsent(logger, wrapped); if (temp != null) wrapped = temp; } return wrapped; }
public static NoSpamLogger getLogger(Logger logger, long minInterval, TimeUnit unit) { NoSpamLogger wrapped = wrappedLoggers.get(logger); if (wrapped == null) { wrapped = new NoSpamLogger(logger, minInterval, unit); NoSpamLogger temp = wrappedLoggers.putIfAbsent(logger, wrapped); if (temp != null) wrapped = temp; } return wrapped; }
public NoSpamLogStatement getStatement(String s, long minIntervalNanos) { NoSpamLogStatement statement = lastMessage.get(s); if (statement == null) { statement = new NoSpamLogStatement(s, minIntervalNanos); NoSpamLogStatement temp = lastMessage.putIfAbsent(s, statement); if (temp != null) statement = temp; } return statement; } }
public static NoSpamLogger getLogger(Logger logger, long minInterval, TimeUnit unit) { NoSpamLogger wrapped = wrappedLoggers.get(logger); if (wrapped == null) { wrapped = new NoSpamLogger(logger, minInterval, unit); NoSpamLogger temp = wrappedLoggers.putIfAbsent(logger, wrapped); if (temp != null) wrapped = temp; } return wrapped; }