/** * Optionally hide this part of the command line from being printed to the log. * @param a a command argument * @param mask true to suppress in output, false to print normally * @return this * @see hudson.Launcher.ProcStarter#masks(boolean[]) * @see Launcher#maskedPrintCommandLine(List, boolean[], FilePath) * @since 1.378 */ public ArgumentListBuilder add(String a, boolean mask) { if(a!=null) { if(mask) { this.mask.set(args.size()); } args.add(a); } return this; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, getProgress_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } }
private void setMonths(BitSet bits, String value) { int max = 12; value = replaceOrdinals(value, "FOO,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC"); BitSet months = new BitSet(13); // Months start with 1 in Cron and 0 in Calendar, so push the values first into a longer bit set setNumberHits(months, value, 1, max + 1); // ... and then rotate it to the front of the months for (int i = 1; i <= max; i++) { if (months.get(i)) { bits.set(i - 1); } } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, appendOutput_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetEvent()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetEvent()) { struct.event.write(oprot); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, removeNimbus_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNumber()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetNumber()) { oprot.writeI32(struct.number); } }
private static void placePhi(MethodNode mth, int regNum, LiveVarAnalysis la) { List<BlockNode> blocks = mth.getBasicBlocks(); int blocksCount = blocks.size(); BitSet hasPhi = new BitSet(blocksCount); BitSet processed = new BitSet(blocksCount); Deque<BlockNode> workList = new LinkedList<>(); BitSet assignBlocks = la.getAssignBlocks(regNum); for (int id = assignBlocks.nextSetBit(0); id >= 0; id = assignBlocks.nextSetBit(id + 1)) { processed.set(id); workList.add(blocks.get(id)); } while (!workList.isEmpty()) { BlockNode block = workList.pop(); BitSet domFrontier = block.getDomFrontier(); for (int id = domFrontier.nextSetBit(0); id >= 0; id = domFrontier.nextSetBit(id + 1)) { if (!hasPhi.get(id) && la.isLive(id, regNum)) { BlockNode df = blocks.get(id); addPhi(mth, df, regNum); hasPhi.set(id); if (!processed.get(id)) { processed.set(id); workList.add(df); } } } } }
/** * Add a Comparator to the end of the chain using the * given sort order * * @param comparator Comparator to add to the end of the chain * @param reverse false = forward sort order; true = reverse sort order */ public void addComparator(Comparator comparator, boolean reverse) { checkLocked(); comparatorChain.add(comparator); if (reverse == true) { orderingBits.set(comparatorChain.size() - 1); } }
private static void addToSeenList( BitSet target, long id, long lastId ) { int index = toIntExact( id ); if ( target.get( index ) ) { throw new IllegalStateException( id + " already seen" ); } if ( id > lastId ) { throw new IllegalStateException( "Unexpectedly high id " + id + " seen when last id is " + lastId ); } target.set( index ); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, updateAllOutput_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetEvent()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetEvent()) { struct.event.write(oprot); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } }
@Override public void write(org.apache.storm.thrift.protocol.TProtocol prot, TopologyHistoryInfo struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_topo_ids()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_topo_ids()) { { oprot.writeI32(struct.topo_ids.size()); for (java.lang.String _iter866 : struct.topo_ids) { oprot.writeString(_iter866); } } } }
private static void test(MethodNode mth, int regNum, LiveVarAnalysis la) { List<BlockNode> blocks = mth.getBasicBlocks(); int blocksCount = blocks.size(); BitSet hasPhi = new BitSet(blocksCount); BitSet processed = new BitSet(blocksCount); Deque<BlockNode> workList = new LinkedList<>(); BitSet assignBlocks = la.getAssignBlocks(regNum); for (int id = assignBlocks.nextSetBit(0); id >= 0; id = assignBlocks.nextSetBit(id + 1)) { processed.set(id); workList.add(blocks.get(id)); } while (!workList.isEmpty()) { BlockNode block = workList.pop(); BitSet domFrontier = block.getDomFrontier(); for (int id = domFrontier.nextSetBit(0); id >= 0; id = domFrontier.nextSetBit(id + 1)) { if (!hasPhi.get(id) && la.isLive(id, regNum)) { BlockNode df = blocks.get(id); addPhi(df, regNum); hasPhi.set(id); if (!processed.get(id)) { processed.set(id); workList.add(df); } } } } }