public static Object createCollectionKey(CollectionProxyId proxyId) {
   String name = proxyId.getKeyName();
   String baseName = PartitionKeyUtil.getBaseName(name);
   return name.equals(baseName)
       ? name
       : new PartitionAwareKey(baseName, PartitionKeyUtil.getPartitionKey(name));
 }
 public static MultiMapConfig createConfig(CollectionProxyId proxyId) {
   switch (proxyId.getType()) {
     case MULTI_MAP:
       return new MultiMapConfig().setName(proxyId.getName());
     case LIST:
       return new MultiMapConfig()
           .setName(COLLECTION_LIST_NAME + proxyId.getKeyName())
           .setValueCollectionType(MultiMapConfig.ValueCollectionType.LIST);
     case SET:
       return new MultiMapConfig()
           .setName(COLLECTION_SET_NAME + proxyId.getKeyName())
           .setValueCollectionType(MultiMapConfig.ValueCollectionType.SET);
     default:
       throw new IllegalArgumentException("Illegal proxy type: " + proxyId.getType());
   }
 }
 public void readData(ObjectDataInput in) throws IOException {
   proxyId = new CollectionProxyId();
   proxyId.readData(in);
   operationFactoryType = OperationFactoryType.getByType(in.readInt());
   key = IOUtil.readNullableData(in);
   value = IOUtil.readNullableData(in);
 }
 public String getName() {
   return proxyId.getName();
 }
 public void writeData(ObjectDataOutput out) throws IOException {
   proxyId.writeData(out);
   out.writeInt(operationFactoryType.type);
   IOUtil.writeNullableData(out, key);
   IOUtil.writeNullableData(out, value);
 }