Feature Request P2
Status Update
Comments
jl...@google.com <jl...@google.com> #2
i meant the following:
import com.google.appengine.api.memcache.MemcacheService;
import com.google.appengine.api.memcache.MemcacheServiceFactory;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
public class AppEngineCache implements Map {
protected MemcacheService cache = MemcacheServiceFactory.getMemcacheService();
public int size() {
return new Long(cache.getStatistics().getItemCount()).intValue();
}
public boolean isEmpty() {
return cache.getStatistics().getItemCount() != 0;
}
public boolean containsKey(Object key) {
return cache.contains(key);
}
public boolean containsValue(Object value) {
throw new UnsupportedOperationException("containsValue() is not supported in
App Engine");
}
public Object get(Object key) {
return cache.get(key);
}
public Object put(Object key, Object value) {
cache.put(key, value);
return value;
}
public Object remove(Object key) {
Object value = cache.get(key);
cache.delete(key);
return value;
}
public void putAll(Map m) {
cache.putAll(m);
}
public void clear() {
cache.clearAll();
}
public Set keySet() {
throw new UnsupportedOperationException("keySet() is not supported in App
Engine");
}
public Collection values() {
throw new UnsupportedOperationException("values() is not supported in App
Engine");
}
public Set entrySet() {
throw new UnsupportedOperationException("entrySet() is not supported in App
Engine");
}
}
import com.google.appengine.api.memcache.MemcacheService;
import com.google.appengine.api.memcache.MemcacheServiceFactory;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
public class AppEngineCache implements Map {
protected MemcacheService cache = MemcacheServiceFactory.getMemcacheService();
public int size() {
return new Long(cache.getStatistics().getItemCount()).intValue();
}
public boolean isEmpty() {
return cache.getStatistics().getItemCount() != 0;
}
public boolean containsKey(Object key) {
return cache.contains(key);
}
public boolean containsValue(Object value) {
throw new UnsupportedOperationException("containsValue() is not supported in
App Engine");
}
public Object get(Object key) {
return cache.get(key);
}
public Object put(Object key, Object value) {
cache.put(key, value);
return value;
}
public Object remove(Object key) {
Object value = cache.get(key);
cache.delete(key);
return value;
}
public void putAll(Map m) {
cache.putAll(m);
}
public void clear() {
cache.clearAll();
}
public Set keySet() {
throw new UnsupportedOperationException("keySet() is not supported in App
Engine");
}
public Collection values() {
throw new UnsupportedOperationException("values() is not supported in App
Engine");
}
public Set entrySet() {
throw new UnsupportedOperationException("entrySet() is not supported in App
Engine");
}
}
Description
Customer added 6 nodes to 2 individual instances.
For instance a nodes created were:
node-a1
node-b1
node-a2
node-b2
node-a3
node-b3
For instance b nodes created were:
node-a1
node-b1
node-c1
node-a2
node-b2
node-c2
The inconsistency in the naming convention between the two nodes is confusing to customer as it is right now.