コード例 #1
0
 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));
 }
コード例 #2
0
 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());
   }
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 public String getName() {
   return proxyId.getName();
 }
コード例 #5
0
 public void writeData(ObjectDataOutput out) throws IOException {
   proxyId.writeData(out);
   out.writeInt(operationFactoryType.type);
   IOUtil.writeNullableData(out, key);
   IOUtil.writeNullableData(out, value);
 }