@Override
  public CliFunctionResult executeFunction(FunctionContext context) {
    final Object[] args = (Object[]) context.getArguments();
    final String diskStoreName = (String) args[0];
    final DiskStoreAttributes diskStoreAttrs = (DiskStoreAttributes) args[1];

    InternalCache cache = (InternalCache) context.getCache();
    DiskStoreFactory diskStoreFactory = cache.createDiskStoreFactory(diskStoreAttrs);
    diskStoreFactory.create(diskStoreName);

    return new CliFunctionResult(context.getMemberName(), Result.Status.OK,
        "Created disk store " + diskStoreName);
  }
Function used by the 'create disk-store' gfsh command to create a disk store on each member.

@since GemFire 8.0
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDiskStoreFunction.java