@Override public BasicIoTaskBuilder<I, O> setCredentialsMap(final Map<String, String> credentials) { if(credentials != null) { this.credentialsMap = credentials; setSecretSupplier(null); } return this; }
@Override @SuppressWarnings("unchecked") public O getInstance(final I item) throws IOException { final String uid; return (O) new BasicIoTask<>( originCode, ioType, item, inputPath, getNextOutputPath(), Credential.getInstance(uid = getNextUid(), getNextSecret(uid)) ); }
@Override public void close() throws IOException { super.close(); if(srcItemsForConcat != null) { srcItemsForConcat.clear(); srcItemsForConcat = null; } if(fixedRanges != null) { fixedRanges.clear(); fixedRanges = null; } }
@Override @SuppressWarnings("unchecked") public void getInstances(final List<I> items, final List<O> buff) throws IOException { String uid; for(final I item : items) { buff.add( (O) new BasicIoTask<>( originCode, ioType, item, inputPath, getNextOutputPath(), Credential.getInstance(uid = getNextUid(), getNextSecret(uid)) ) ); } }