コード例 #1
0
  public EntryMetaData[] getMetaDataSchema(String storeName) {
    List<EntryMetaData> schemaBuilder = Lists.newArrayList();
    StoreFeatures features = getFeatures();
    if (features.hasTimestamps() && storageConfig.get(STORE_META_TIMESTAMPS, storeName))
      schemaBuilder.add(EntryMetaData.TIMESTAMP);
    if (features.hasCellTTL() && storageConfig.get(STORE_META_TTL, storeName))
      schemaBuilder.add(EntryMetaData.TTL);
    if (features.hasVisibility() && storageConfig.get(STORE_META_VISIBILITY, storeName))
      schemaBuilder.add(EntryMetaData.VISIBILITY);

    if (schemaBuilder.isEmpty()) return StaticArrayEntry.EMPTY_SCHEMA;
    return schemaBuilder.toArray(new EntryMetaData[schemaBuilder.size()]);
  }
コード例 #2
0
 public static boolean supportsStoreTTL(StoreFeatures features) {
   return features.hasCellTTL() || features.hasStoreTTL();
 }