Search in sources :

Example 1 with FindAndDeleteGarbageArg

use of org.apache.ignite.internal.commandline.cache.argument.FindAndDeleteGarbageArg in project ignite by apache.

the class FindAndDeleteGarbage method parseArguments.

/**
 * {@inheritDoc}
 */
@Override
public void parseArguments(CommandArgIterator argIter) {
    boolean delete = false;
    UUID nodeId = null;
    Set<String> groups = null;
    int argsCnt = 0;
    while (argIter.hasNextSubArg() && argsCnt++ < 3) {
        String nextArg = argIter.nextArg("");
        FindAndDeleteGarbageArg arg = CommandArgUtils.of(nextArg, FindAndDeleteGarbageArg.class);
        if (arg == FindAndDeleteGarbageArg.DELETE) {
            delete = true;
            continue;
        }
        try {
            nodeId = UUID.fromString(nextArg);
            continue;
        } catch (IllegalArgumentException ignored) {
        // No-op.
        }
        groups = argIter.parseStringSet(nextArg);
    }
    args = new Arguments(groups, nodeId, delete);
}
Also used : FindAndDeleteGarbageArg(org.apache.ignite.internal.commandline.cache.argument.FindAndDeleteGarbageArg) UUID(java.util.UUID)

Aggregations

UUID (java.util.UUID)1 FindAndDeleteGarbageArg (org.apache.ignite.internal.commandline.cache.argument.FindAndDeleteGarbageArg)1