When should I use PDU.GETBULK in snmp gettbale method?

Here is my code

DefaultPDUFactory defaultPDUFactory= new DefaultPDUFactory(PDU.GETBULK);
if (target instanceof UserTarget) {
OctetString contextEngineId = new OctetString("");
OctetString contextName = new OctetString("");
tableUtils = new TableUtils(snmp, defaultPDUFactory);
List<VariableBinding[]> returnList = new ArrayList<VariableBinding[]>(); 
OID[] columns = new OID[oids.size()]; for (int i = 0; i < oids.size(); i++) { columns[i] = new OID(oids.get(i)); } List<TableEvent> events = events = tableUtils.getTable(target, columns, null, null); 

I find that I can use the code below .When should I use PDU.GETBULK in snmp gettbale method?

DefaultPDUFactory defaultPDUFactory= new DefaultPDUFactory();

1 Like