_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q10000 | callhome.update | train | public static base_response update(nitro_service client, callhome resource) throws Exception {
callhome updateresource = new callhome();
updateresource.emailaddress = resource.emailaddress;
updateresource.proxymode = resource.proxymode;
updateresource.ipaddress = resource.ipaddress;
updateresource.port = resource.port;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10001 | callhome.unset | train | public static base_response unset(nitro_service client, callhome resource, String[] args) throws Exception{
callhome unsetresource = new callhome();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q10002 | callhome.get | train | public static callhome get(nitro_service service) throws Exception{
callhome obj = new callhome();
callhome[] response = (callhome[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10003 | csvserver_appflowpolicy_binding.get | train | public static csvserver_appflowpolicy_binding[] get(nitro_service service, String name) throws Exception{
csvserver_appflowpolicy_binding obj = new csvserver_appflowpolicy_binding();
obj.set_name(name);
csvserver_appflowpolicy_binding response[] = (csvserver_appflowpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10004 | cachepolicy_cacheglobal_binding.get | train | public static cachepolicy_cacheglobal_binding[] get(nitro_service service, String policyname) throws Exception{
cachepolicy_cacheglobal_binding obj = new cachepolicy_cacheglobal_binding();
obj.set_policyname(policyname);
cachepolicy_cacheglobal_binding response[] = (cachepolicy_cacheglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10005 | sslglobal_sslpolicy_binding.get | train | public static sslglobal_sslpolicy_binding[] get(nitro_service service) throws Exception{
sslglobal_sslpolicy_binding obj = new sslglobal_sslpolicy_binding();
sslglobal_sslpolicy_binding response[] = (sslglobal_sslpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10006 | sslglobal_sslpolicy_binding.get_filtered | train | public static sslglobal_sslpolicy_binding[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
sslglobal_sslpolicy_binding obj = new sslglobal_sslpolicy_binding();
options option = new options();
option.set_filter(filter);
sslglobal_sslpolicy_binding[] response = (sslglobal_sslpolicy_binding[]) obj.getfiltered(service, option);
return response;
} | java | {
"resource": ""
} |
q10007 | CollectionValuedMap.put | train | public Collection<V> put(K key, Collection<V> collection) {
return map.put(key, collection);
} | java | {
"resource": ""
} |
q10008 | CollectionValuedMap.add | train | public void add(K key, V value) {
if (treatCollectionsAsImmutable) {
Collection<V> newC = cf.newCollection();
Collection<V> c = map.get(key);
if (c != null) {
newC.addAll(c);
}
newC.add(value);
map.put(key, newC); // replacing the old collection
} else {
Collection<V> c = map.get(key);
if (c == null) {
c = cf.newCollection();
map.put(key, c);
}
c.add(value); // modifying the old collection
}
} | java | {
"resource": ""
} |
q10009 | CollectionValuedMap.removeMapping | train | public void removeMapping(K key, V value) {
if (treatCollectionsAsImmutable) {
Collection<V> c = map.get(key);
if (c != null) {
Collection<V> newC = cf.newCollection();
newC.addAll(c);
newC.remove(value);
map.put(key, newC);
}
} else {
Collection<V> c = get(key);
c.remove(value);
}
} | java | {
"resource": ""
} |
q10010 | CollectionValuedMap.deltaClone | train | public CollectionValuedMap<K, V> deltaClone() {
CollectionValuedMap<K, V> result = new CollectionValuedMap<K, V>(null, cf, true);
result.map = new DeltaMap<K, Collection<V>>(this.map);
return result;
} | java | {
"resource": ""
} |
q10011 | linkset_interface_binding.get | train | public static linkset_interface_binding[] get(nitro_service service, String id) throws Exception{
linkset_interface_binding obj = new linkset_interface_binding();
obj.set_id(id);
linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10012 | linkset_interface_binding.count | train | public static long count(nitro_service service, String id) throws Exception{
linkset_interface_binding obj = new linkset_interface_binding();
obj.set_id(id);
options option = new options();
option.set_count(true);
linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | java | {
"resource": ""
} |
q10013 | tmtrafficpolicy_lbvserver_binding.get | train | public static tmtrafficpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_lbvserver_binding obj = new tmtrafficpolicy_lbvserver_binding();
obj.set_name(name);
tmtrafficpolicy_lbvserver_binding response[] = (tmtrafficpolicy_lbvserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10014 | vlan_interface_binding.get | train | public static vlan_interface_binding[] get(nitro_service service, Long id) throws Exception{
vlan_interface_binding obj = new vlan_interface_binding();
obj.set_id(id);
vlan_interface_binding response[] = (vlan_interface_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10015 | rewritepolicy_csvserver_binding.get | train | public static rewritepolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
rewritepolicy_csvserver_binding obj = new rewritepolicy_csvserver_binding();
obj.set_name(name);
rewritepolicy_csvserver_binding response[] = (rewritepolicy_csvserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10016 | tunneltrafficpolicy.get | train | public static tunneltrafficpolicy[] get(nitro_service service, options option) throws Exception{
tunneltrafficpolicy obj = new tunneltrafficpolicy();
tunneltrafficpolicy[] response = (tunneltrafficpolicy[])obj.get_resources(service,option);
return response;
} | java | {
"resource": ""
} |
q10017 | tunneltrafficpolicy.get | train | public static tunneltrafficpolicy get(nitro_service service, String name) throws Exception{
tunneltrafficpolicy obj = new tunneltrafficpolicy();
obj.set_name(name);
tunneltrafficpolicy response = (tunneltrafficpolicy) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10018 | vpnglobal_intranetip_binding.get | train | public static vpnglobal_intranetip_binding[] get(nitro_service service) throws Exception{
vpnglobal_intranetip_binding obj = new vpnglobal_intranetip_binding();
vpnglobal_intranetip_binding response[] = (vpnglobal_intranetip_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10019 | sslaction.add | train | public static base_response add(nitro_service client, sslaction resource) throws Exception {
sslaction addresource = new sslaction();
addresource.name = resource.name;
addresource.clientauth = resource.clientauth;
addresource.clientcert = resource.clientcert;
addresource.certheader = resource.certheader;
addresource.clientcertserialnumber = resource.clientcertserialnumber;
addresource.certserialheader = resource.certserialheader;
addresource.clientcertsubject = resource.clientcertsubject;
addresource.certsubjectheader = resource.certsubjectheader;
addresource.clientcerthash = resource.clientcerthash;
addresource.certhashheader = resource.certhashheader;
addresource.clientcertissuer = resource.clientcertissuer;
addresource.certissuerheader = resource.certissuerheader;
addresource.sessionid = resource.sessionid;
addresource.sessionidheader = resource.sessionidheader;
addresource.cipher = resource.cipher;
addresource.cipherheader = resource.cipherheader;
addresource.clientcertnotbefore = resource.clientcertnotbefore;
addresource.certnotbeforeheader = resource.certnotbeforeheader;
addresource.clientcertnotafter = resource.clientcertnotafter;
addresource.certnotafterheader = resource.certnotafterheader;
addresource.owasupport = resource.owasupport;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q10020 | sslaction.add | train | public static base_responses add(nitro_service client, sslaction resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslaction addresources[] = new sslaction[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new sslaction();
addresources[i].name = resources[i].name;
addresources[i].clientauth = resources[i].clientauth;
addresources[i].clientcert = resources[i].clientcert;
addresources[i].certheader = resources[i].certheader;
addresources[i].clientcertserialnumber = resources[i].clientcertserialnumber;
addresources[i].certserialheader = resources[i].certserialheader;
addresources[i].clientcertsubject = resources[i].clientcertsubject;
addresources[i].certsubjectheader = resources[i].certsubjectheader;
addresources[i].clientcerthash = resources[i].clientcerthash;
addresources[i].certhashheader = resources[i].certhashheader;
addresources[i].clientcertissuer = resources[i].clientcertissuer;
addresources[i].certissuerheader = resources[i].certissuerheader;
addresources[i].sessionid = resources[i].sessionid;
addresources[i].sessionidheader = resources[i].sessionidheader;
addresources[i].cipher = resources[i].cipher;
addresources[i].cipherheader = resources[i].cipherheader;
addresources[i].clientcertnotbefore = resources[i].clientcertnotbefore;
addresources[i].certnotbeforeheader = resources[i].certnotbeforeheader;
addresources[i].clientcertnotafter = resources[i].clientcertnotafter;
addresources[i].certnotafterheader = resources[i].certnotafterheader;
addresources[i].owasupport = resources[i].owasupport;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | {
"resource": ""
} |
q10021 | sslaction.get | train | public static sslaction[] get(nitro_service service) throws Exception{
sslaction obj = new sslaction();
sslaction[] response = (sslaction[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10022 | sslaction.get | train | public static sslaction get(nitro_service service, String name) throws Exception{
sslaction obj = new sslaction();
obj.set_name(name);
sslaction response = (sslaction) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10023 | rewriteglobal_binding.get | train | public static rewriteglobal_binding get(nitro_service service) throws Exception{
rewriteglobal_binding obj = new rewriteglobal_binding();
rewriteglobal_binding response = (rewriteglobal_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10024 | vpath_stats.get | train | public static vpath_stats get(nitro_service service) throws Exception{
vpath_stats obj = new vpath_stats();
vpath_stats[] response = (vpath_stats[])obj.stat_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10025 | aaauser_auditsyslogpolicy_binding.get | train | public static aaauser_auditsyslogpolicy_binding[] get(nitro_service service, String username) throws Exception{
aaauser_auditsyslogpolicy_binding obj = new aaauser_auditsyslogpolicy_binding();
obj.set_username(username);
aaauser_auditsyslogpolicy_binding response[] = (aaauser_auditsyslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10026 | lbvserver_cachepolicy_binding.get | train | public static lbvserver_cachepolicy_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_cachepolicy_binding obj = new lbvserver_cachepolicy_binding();
obj.set_name(name);
lbvserver_cachepolicy_binding response[] = (lbvserver_cachepolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10027 | tunnelip_stats.get | train | public static tunnelip_stats[] get(nitro_service service) throws Exception{
tunnelip_stats obj = new tunnelip_stats();
tunnelip_stats[] response = (tunnelip_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q10028 | tunnelip_stats.get | train | public static tunnelip_stats get(nitro_service service, String tunnelip) throws Exception{
tunnelip_stats obj = new tunnelip_stats();
obj.set_tunnelip(tunnelip);
tunnelip_stats response = (tunnelip_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q10029 | FactoredSequenceListener.updateSequenceElement | train | public void updateSequenceElement(int[] sequence, int pos, int oldVal) {
if(models != null){
for(int i = 0; i < models.length; i++)
models[i].updateSequenceElement(sequence, pos, oldVal);
return;
}
model1.updateSequenceElement(sequence, pos, 0);
model2.updateSequenceElement(sequence, pos, 0);
} | java | {
"resource": ""
} |
q10030 | FactoredSequenceListener.setInitialSequence | train | public void setInitialSequence(int[] sequence) {
if(models != null){
for(int i = 0; i < models.length; i++)
models[i].setInitialSequence(sequence);
return;
}
model1.setInitialSequence(sequence);
model2.setInitialSequence(sequence);
} | java | {
"resource": ""
} |
q10031 | DelimitRegExIterator.getFactory | train | public static <T> IteratorFromReaderFactory<T> getFactory(String delim, Function<String,T> op) {
return new DelimitRegExIteratorFactory<T>(delim, op);
} | java | {
"resource": ""
} |
q10032 | lbmonbindings_servicegroup_binding.get | train | public static lbmonbindings_servicegroup_binding[] get(nitro_service service, String monitorname) throws Exception{
lbmonbindings_servicegroup_binding obj = new lbmonbindings_servicegroup_binding();
obj.set_monitorname(monitorname);
lbmonbindings_servicegroup_binding response[] = (lbmonbindings_servicegroup_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10033 | MtasSolrRunningList.checkForExceptions | train | public final List<MtasSolrStatus> checkForExceptions() {
List<MtasSolrStatus> statusWithException = null;
for (MtasSolrStatus item : data) {
if (item.checkResponseForException()) {
if (statusWithException == null) {
statusWithException = new ArrayList<>();
}
statusWithException.add(item);
}
}
return statusWithException;
} | java | {
"resource": ""
} |
q10034 | authenticationradiuspolicy_authenticationvserver_binding.get | train | public static authenticationradiuspolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{
authenticationradiuspolicy_authenticationvserver_binding obj = new authenticationradiuspolicy_authenticationvserver_binding();
obj.set_name(name);
authenticationradiuspolicy_authenticationvserver_binding response[] = (authenticationradiuspolicy_authenticationvserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10035 | vpnvserver_authenticationsamlpolicy_binding.get | train | public static vpnvserver_authenticationsamlpolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_authenticationsamlpolicy_binding obj = new vpnvserver_authenticationsamlpolicy_binding();
obj.set_name(name);
vpnvserver_authenticationsamlpolicy_binding response[] = (vpnvserver_authenticationsamlpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10036 | sslpkcs8.convert | train | public static base_response convert(nitro_service client, sslpkcs8 resource) throws Exception {
sslpkcs8 convertresource = new sslpkcs8();
convertresource.pkcs8file = resource.pkcs8file;
convertresource.keyfile = resource.keyfile;
convertresource.keyform = resource.keyform;
convertresource.password = resource.password;
return convertresource.perform_operation(client,"convert");
} | java | {
"resource": ""
} |
q10037 | ci.get | train | public static ci[] get(nitro_service service) throws Exception{
ci obj = new ci();
ci[] response = (ci[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10038 | sslcipher.add | train | public static base_response add(nitro_service client, sslcipher resource) throws Exception {
sslcipher addresource = new sslcipher();
addresource.ciphergroupname = resource.ciphergroupname;
addresource.ciphgrpalias = resource.ciphgrpalias;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q10039 | sslcipher.add | train | public static base_responses add(nitro_service client, sslcipher resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslcipher addresources[] = new sslcipher[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new sslcipher();
addresources[i].ciphergroupname = resources[i].ciphergroupname;
addresources[i].ciphgrpalias = resources[i].ciphgrpalias;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | {
"resource": ""
} |
q10040 | sslcipher.delete | train | public static base_response delete(nitro_service client, String ciphergroupname) throws Exception {
sslcipher deleteresource = new sslcipher();
deleteresource.ciphergroupname = ciphergroupname;
return deleteresource.delete_resource(client);
} | java | {
"resource": ""
} |
q10041 | sslcipher.delete | train | public static base_responses delete(nitro_service client, String ciphergroupname[]) throws Exception {
base_responses result = null;
if (ciphergroupname != null && ciphergroupname.length > 0) {
sslcipher deleteresources[] = new sslcipher[ciphergroupname.length];
for (int i=0;i<ciphergroupname.length;i++){
deleteresources[i] = new sslcipher();
deleteresources[i].ciphergroupname = ciphergroupname[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | java | {
"resource": ""
} |
q10042 | sslcipher.get | train | public static sslcipher[] get(nitro_service service) throws Exception{
sslcipher obj = new sslcipher();
sslcipher[] response = (sslcipher[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10043 | sslcipher.get | train | public static sslcipher get(nitro_service service, String ciphergroupname) throws Exception{
sslcipher obj = new sslcipher();
obj.set_ciphergroupname(ciphergroupname);
sslcipher response = (sslcipher) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10044 | sslcipher.get | train | public static sslcipher[] get(nitro_service service, String ciphergroupname[]) throws Exception{
if (ciphergroupname !=null && ciphergroupname.length>0) {
sslcipher response[] = new sslcipher[ciphergroupname.length];
sslcipher obj[] = new sslcipher[ciphergroupname.length];
for (int i=0;i<ciphergroupname.length;i++) {
obj[i] = new sslcipher();
obj[i].set_ciphergroupname(ciphergroupname[i]);
response[i] = (sslcipher) obj[i].get_resource(service);
}
return response;
}
return null;
} | java | {
"resource": ""
} |
q10045 | transformpolicy.add | train | public static base_response add(nitro_service client, transformpolicy resource) throws Exception {
transformpolicy addresource = new transformpolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.profilename = resource.profilename;
addresource.comment = resource.comment;
addresource.logaction = resource.logaction;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q10046 | transformpolicy.update | train | public static base_response update(nitro_service client, transformpolicy resource) throws Exception {
transformpolicy updateresource = new transformpolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.profilename = resource.profilename;
updateresource.comment = resource.comment;
updateresource.logaction = resource.logaction;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10047 | transformpolicy.get | train | public static transformpolicy[] get(nitro_service service) throws Exception{
transformpolicy obj = new transformpolicy();
transformpolicy[] response = (transformpolicy[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10048 | transformpolicy.get | train | public static transformpolicy get(nitro_service service, String name) throws Exception{
transformpolicy obj = new transformpolicy();
obj.set_name(name);
transformpolicy response = (transformpolicy) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10049 | WordTag.compareTo | train | public int compareTo(WordTag wordTag) {
int first = (word != null ? word().compareTo(wordTag.word()) : 0);
if(first != 0)
return first;
else {
if (tag() == null) {
if (wordTag.tag() == null)
return 0;
else
return -1;
}
return tag().compareTo(wordTag.tag());
}
} | java | {
"resource": ""
} |
q10050 | OpenLongIntHashMap.rehash | train | protected void rehash(int newCapacity) {
int oldCapacity = table.length;
//if (oldCapacity == newCapacity) return;
long oldTable[] = table;
int oldValues[] = values;
byte oldState[] = state;
long newTable[] = new long[newCapacity];
int newValues[] = new int[newCapacity];
byte newState[] = new byte[newCapacity];
this.lowWaterMark = chooseLowWaterMark(newCapacity,this.minLoadFactor);
this.highWaterMark = chooseHighWaterMark(newCapacity,this.maxLoadFactor);
this.table = newTable;
this.values = newValues;
this.state = newState;
this.freeEntries = newCapacity-this.distinct; // delta
for (int i = oldCapacity ; i-- > 0 ;) {
if (oldState[i]==FULL) {
long element = oldTable[i];
int index = indexOfInsertion(element);
newTable[index]=element;
newValues[index]=oldValues[i];
newState[index]=FULL;
}
}
} | java | {
"resource": ""
} |
q10051 | OpenLongIntHashMap.removeKey | train | public boolean removeKey(long key) {
int i = indexOfKey(key);
if (i<0) return false; // key not contained
this.state[i]=REMOVED;
this.values[i]=0; // delta
this.distinct--;
if (this.distinct < this.lowWaterMark) {
int newCapacity = chooseShrinkCapacity(this.distinct,this.minLoadFactor, this.maxLoadFactor);
rehash(newCapacity);
}
return true;
} | java | {
"resource": ""
} |
q10052 | XMLUtils.getXmlParser | train | public static DocumentBuilder getXmlParser() {
DocumentBuilder db = null;
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
//Disable DTD loading and validation
//See http://stackoverflow.com/questions/155101/make-documentbuilder-parse-ignore-dtd-references
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false);
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
db = dbf.newDocumentBuilder();
db.setErrorHandler(new SAXErrorHandler());
} catch (ParserConfigurationException e) {
System.err.printf("%s: Unable to create XML parser\n", XMLUtils.class.getName());
e.printStackTrace();
} catch(UnsupportedOperationException e) {
System.err.printf("%s: API error while setting up XML parser. Check your JAXP version\n", XMLUtils.class.getName());
e.printStackTrace();
}
return db;
} | java | {
"resource": ""
} |
q10053 | XMLUtils.readUntilTag | train | public static String readUntilTag(Reader r) throws IOException {
if (!r.ready()) {
return "";
}
StringBuilder b = new StringBuilder();
int c = r.read();
while (c >= 0 && c != '<') {
b.append((char) c);
c = r.read();
}
return b.toString();
} | java | {
"resource": ""
} |
q10054 | XMLUtils.findSpace | train | public static int findSpace(String haystack, int begin) {
int space = haystack.indexOf(' ', begin);
int nbsp = haystack.indexOf('\u00A0', begin);
if (space == -1 && nbsp == -1) {
return -1;
} else if (space >= 0 && nbsp >= 0) {
return Math.min(space, nbsp);
} else {
// eg one is -1, and the other is >= 0
return Math.max(space, nbsp);
}
} | java | {
"resource": ""
} |
q10055 | XMLUtils.readTag | train | public static String readTag(Reader r) throws IOException {
if ( ! r.ready()) {
return null;
}
StringBuilder b = new StringBuilder("<");
int c = r.read();
while (c >= 0) {
b.append((char) c);
if (c == '>') {
break;
}
c = r.read();
}
if (b.length() == 1) {
return null;
}
return b.toString();
} | java | {
"resource": ""
} |
q10056 | XMLUtils.readDocumentFromString | train | public static Document readDocumentFromString(String s) throws Exception {
InputSource in = new InputSource(new StringReader(s));
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(false);
return factory.newDocumentBuilder().parse(in);
} | java | {
"resource": ""
} |
q10057 | rsskeytype.update | train | public static base_response update(nitro_service client, rsskeytype resource) throws Exception {
rsskeytype updateresource = new rsskeytype();
updateresource.rsstype = resource.rsstype;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10058 | rsskeytype.get | train | public static rsskeytype get(nitro_service service) throws Exception{
rsskeytype obj = new rsskeytype();
rsskeytype[] response = (rsskeytype[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10059 | vpntrafficpolicy_vpnglobal_binding.get | train | public static vpntrafficpolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
vpntrafficpolicy_vpnglobal_binding obj = new vpntrafficpolicy_vpnglobal_binding();
obj.set_name(name);
vpntrafficpolicy_vpnglobal_binding response[] = (vpntrafficpolicy_vpnglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10060 | tmglobal_tmsessionpolicy_binding.get | train | public static tmglobal_tmsessionpolicy_binding[] get(nitro_service service) throws Exception{
tmglobal_tmsessionpolicy_binding obj = new tmglobal_tmsessionpolicy_binding();
tmglobal_tmsessionpolicy_binding response[] = (tmglobal_tmsessionpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10061 | systemglobal_authenticationldappolicy_binding.get | train | public static systemglobal_authenticationldappolicy_binding[] get(nitro_service service) throws Exception{
systemglobal_authenticationldappolicy_binding obj = new systemglobal_authenticationldappolicy_binding();
systemglobal_authenticationldappolicy_binding response[] = (systemglobal_authenticationldappolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10062 | authenticationvserver_authenticationradiuspolicy_binding.get | train | public static authenticationvserver_authenticationradiuspolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_authenticationradiuspolicy_binding obj = new authenticationvserver_authenticationradiuspolicy_binding();
obj.set_name(name);
authenticationvserver_authenticationradiuspolicy_binding response[] = (authenticationvserver_authenticationradiuspolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10063 | auditnslogpolicy_authenticationvserver_binding.get | train | public static auditnslogpolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{
auditnslogpolicy_authenticationvserver_binding obj = new auditnslogpolicy_authenticationvserver_binding();
obj.set_name(name);
auditnslogpolicy_authenticationvserver_binding response[] = (auditnslogpolicy_authenticationvserver_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10064 | vlan_nsip6_binding.get | train | public static vlan_nsip6_binding[] get(nitro_service service, Long id) throws Exception{
vlan_nsip6_binding obj = new vlan_nsip6_binding();
obj.set_id(id);
vlan_nsip6_binding response[] = (vlan_nsip6_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10065 | appflowpolicylabel.get | train | public static appflowpolicylabel[] get(nitro_service service) throws Exception{
appflowpolicylabel obj = new appflowpolicylabel();
appflowpolicylabel[] response = (appflowpolicylabel[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10066 | appflowpolicylabel.get | train | public static appflowpolicylabel get(nitro_service service, String labelname) throws Exception{
appflowpolicylabel obj = new appflowpolicylabel();
obj.set_labelname(labelname);
appflowpolicylabel response = (appflowpolicylabel) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10067 | nslimitidentifier_stats.get | train | public static nslimitidentifier_stats[] get(nitro_service service) throws Exception{
nslimitidentifier_stats obj = new nslimitidentifier_stats();
nslimitidentifier_stats[] response = (nslimitidentifier_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q10068 | nslimitidentifier_stats.get | train | public static nslimitidentifier_stats get(nitro_service service, String name) throws Exception{
nslimitidentifier_stats obj = new nslimitidentifier_stats();
obj.set_name(name);
nslimitidentifier_stats response = (nslimitidentifier_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q10069 | cachecontentgroup.add | train | public static base_response add(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup addresource = new cachecontentgroup();
addresource.name = resource.name;
addresource.weakposrelexpiry = resource.weakposrelexpiry;
addresource.heurexpiryparam = resource.heurexpiryparam;
addresource.relexpiry = resource.relexpiry;
addresource.relexpirymillisec = resource.relexpirymillisec;
addresource.absexpiry = resource.absexpiry;
addresource.absexpirygmt = resource.absexpirygmt;
addresource.weaknegrelexpiry = resource.weaknegrelexpiry;
addresource.hitparams = resource.hitparams;
addresource.invalparams = resource.invalparams;
addresource.ignoreparamvaluecase = resource.ignoreparamvaluecase;
addresource.matchcookies = resource.matchcookies;
addresource.invalrestrictedtohost = resource.invalrestrictedtohost;
addresource.polleverytime = resource.polleverytime;
addresource.ignorereloadreq = resource.ignorereloadreq;
addresource.removecookies = resource.removecookies;
addresource.prefetch = resource.prefetch;
addresource.prefetchperiod = resource.prefetchperiod;
addresource.prefetchperiodmillisec = resource.prefetchperiodmillisec;
addresource.prefetchmaxpending = resource.prefetchmaxpending;
addresource.flashcache = resource.flashcache;
addresource.expireatlastbyte = resource.expireatlastbyte;
addresource.insertvia = resource.insertvia;
addresource.insertage = resource.insertage;
addresource.insertetag = resource.insertetag;
addresource.cachecontrol = resource.cachecontrol;
addresource.quickabortsize = resource.quickabortsize;
addresource.minressize = resource.minressize;
addresource.maxressize = resource.maxressize;
addresource.memlimit = resource.memlimit;
addresource.ignorereqcachinghdrs = resource.ignorereqcachinghdrs;
addresource.minhits = resource.minhits;
addresource.alwaysevalpolicies = resource.alwaysevalpolicies;
addresource.persist = resource.persist;
addresource.pinned = resource.pinned;
addresource.lazydnsresolve = resource.lazydnsresolve;
addresource.hitselector = resource.hitselector;
addresource.invalselector = resource.invalselector;
addresource.type = resource.type;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q10070 | cachecontentgroup.update | train | public static base_response update(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup updateresource = new cachecontentgroup();
updateresource.name = resource.name;
updateresource.weakposrelexpiry = resource.weakposrelexpiry;
updateresource.heurexpiryparam = resource.heurexpiryparam;
updateresource.relexpiry = resource.relexpiry;
updateresource.relexpirymillisec = resource.relexpirymillisec;
updateresource.absexpiry = resource.absexpiry;
updateresource.absexpirygmt = resource.absexpirygmt;
updateresource.weaknegrelexpiry = resource.weaknegrelexpiry;
updateresource.hitparams = resource.hitparams;
updateresource.invalparams = resource.invalparams;
updateresource.ignoreparamvaluecase = resource.ignoreparamvaluecase;
updateresource.matchcookies = resource.matchcookies;
updateresource.invalrestrictedtohost = resource.invalrestrictedtohost;
updateresource.polleverytime = resource.polleverytime;
updateresource.ignorereloadreq = resource.ignorereloadreq;
updateresource.removecookies = resource.removecookies;
updateresource.prefetch = resource.prefetch;
updateresource.prefetchperiod = resource.prefetchperiod;
updateresource.prefetchperiodmillisec = resource.prefetchperiodmillisec;
updateresource.prefetchmaxpending = resource.prefetchmaxpending;
updateresource.flashcache = resource.flashcache;
updateresource.expireatlastbyte = resource.expireatlastbyte;
updateresource.insertvia = resource.insertvia;
updateresource.insertage = resource.insertage;
updateresource.insertetag = resource.insertetag;
updateresource.cachecontrol = resource.cachecontrol;
updateresource.quickabortsize = resource.quickabortsize;
updateresource.minressize = resource.minressize;
updateresource.maxressize = resource.maxressize;
updateresource.memlimit = resource.memlimit;
updateresource.ignorereqcachinghdrs = resource.ignorereqcachinghdrs;
updateresource.minhits = resource.minhits;
updateresource.alwaysevalpolicies = resource.alwaysevalpolicies;
updateresource.persist = resource.persist;
updateresource.pinned = resource.pinned;
updateresource.lazydnsresolve = resource.lazydnsresolve;
updateresource.hitselector = resource.hitselector;
updateresource.invalselector = resource.invalselector;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10071 | cachecontentgroup.expire | train | public static base_response expire(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup expireresource = new cachecontentgroup();
expireresource.name = resource.name;
return expireresource.perform_operation(client,"expire");
} | java | {
"resource": ""
} |
q10072 | cachecontentgroup.expire | train | public static base_responses expire(nitro_service client, cachecontentgroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cachecontentgroup expireresources[] = new cachecontentgroup[resources.length];
for (int i=0;i<resources.length;i++){
expireresources[i] = new cachecontentgroup();
expireresources[i].name = resources[i].name;
}
result = perform_operation_bulk_request(client, expireresources,"expire");
}
return result;
} | java | {
"resource": ""
} |
q10073 | cachecontentgroup.flush | train | public static base_response flush(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup flushresource = new cachecontentgroup();
flushresource.name = resource.name;
flushresource.query = resource.query;
flushresource.host = resource.host;
flushresource.selectorvalue = resource.selectorvalue;
flushresource.force = resource.force;
return flushresource.perform_operation(client,"flush");
} | java | {
"resource": ""
} |
q10074 | cachecontentgroup.flush | train | public static base_responses flush(nitro_service client, cachecontentgroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cachecontentgroup flushresources[] = new cachecontentgroup[resources.length];
for (int i=0;i<resources.length;i++){
flushresources[i] = new cachecontentgroup();
flushresources[i].name = resources[i].name;
flushresources[i].query = resources[i].query;
flushresources[i].host = resources[i].host;
flushresources[i].selectorvalue = resources[i].selectorvalue;
flushresources[i].force = resources[i].force;
}
result = perform_operation_bulk_request(client, flushresources,"flush");
}
return result;
} | java | {
"resource": ""
} |
q10075 | cachecontentgroup.save | train | public static base_response save(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup saveresource = new cachecontentgroup();
saveresource.name = resource.name;
return saveresource.perform_operation(client,"save");
} | java | {
"resource": ""
} |
q10076 | cachecontentgroup.save | train | public static base_responses save(nitro_service client, cachecontentgroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cachecontentgroup saveresources[] = new cachecontentgroup[resources.length];
for (int i=0;i<resources.length;i++){
saveresources[i] = new cachecontentgroup();
saveresources[i].name = resources[i].name;
}
result = perform_operation_bulk_request(client, saveresources,"save");
}
return result;
} | java | {
"resource": ""
} |
q10077 | cachecontentgroup.get | train | public static cachecontentgroup[] get(nitro_service service) throws Exception{
cachecontentgroup obj = new cachecontentgroup();
cachecontentgroup[] response = (cachecontentgroup[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10078 | cachecontentgroup.get | train | public static cachecontentgroup get(nitro_service service, String name) throws Exception{
cachecontentgroup obj = new cachecontentgroup();
obj.set_name(name);
cachecontentgroup response = (cachecontentgroup) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10079 | lbvserver_auditnslogpolicy_binding.get | train | public static lbvserver_auditnslogpolicy_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_auditnslogpolicy_binding obj = new lbvserver_auditnslogpolicy_binding();
obj.set_name(name);
lbvserver_auditnslogpolicy_binding response[] = (lbvserver_auditnslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10080 | csparameter.update | train | public static base_response update(nitro_service client, csparameter resource) throws Exception {
csparameter updateresource = new csparameter();
updateresource.stateupdate = resource.stateupdate;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q10081 | csparameter.unset | train | public static base_response unset(nitro_service client, csparameter resource, String[] args) throws Exception{
csparameter unsetresource = new csparameter();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q10082 | csparameter.get | train | public static csparameter get(nitro_service service) throws Exception{
csparameter obj = new csparameter();
csparameter[] response = (csparameter[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q10083 | vpnvserver_rewritepolicy_binding.get | train | public static vpnvserver_rewritepolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_rewritepolicy_binding obj = new vpnvserver_rewritepolicy_binding();
obj.set_name(name);
vpnvserver_rewritepolicy_binding response[] = (vpnvserver_rewritepolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10084 | auditnslogpolicy_systemglobal_binding.get | train | public static auditnslogpolicy_systemglobal_binding[] get(nitro_service service, String name) throws Exception{
auditnslogpolicy_systemglobal_binding obj = new auditnslogpolicy_systemglobal_binding();
obj.set_name(name);
auditnslogpolicy_systemglobal_binding response[] = (auditnslogpolicy_systemglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10085 | responderpolicy_binding.get | train | public static responderpolicy_binding get(nitro_service service, String name) throws Exception{
responderpolicy_binding obj = new responderpolicy_binding();
obj.set_name(name);
responderpolicy_binding response = (responderpolicy_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10086 | BasicDatum.setLabels | train | public void setLabels(Collection<LabelType> labels) {
this.labels.clear();
if (labels != null) {
this.labels.addAll(labels);
}
} | java | {
"resource": ""
} |
q10087 | DefaultMobicentsCluster.onViewChangeEvent | train | @ViewChanged
public synchronized void onViewChangeEvent(ViewChangedEvent event) {
if (logger.isDebugEnabled()) {
logger.debug("onViewChangeEvent : pre[" + event.isPre() + "] : event local address[" + event.getCache().getLocalAddress() + "]");
}
final List<Address> oldView = currentView;
currentView = new ArrayList<Address>(event.getNewView().getMembers());
final Address localAddress = getLocalAddress();
//just a precaution, it can be null!
if (oldView != null) {
final Cache jbossCache = mobicentsCache.getJBossCache();
final Configuration config = jbossCache.getConfiguration();
final boolean isBuddyReplicationEnabled = config.getBuddyReplicationConfig() != null && config.getBuddyReplicationConfig().isEnabled();
// recover stuff from lost members
Runnable runnable = new Runnable() {
public void run() {
for (Address oldMember : oldView) {
if (!currentView.contains(oldMember)) {
if (logger.isDebugEnabled()) {
logger.debug("onViewChangeEvent : processing lost member " + oldMember);
}
for (FailOverListener localListener : failOverListeners) {
ClientLocalListenerElector localListenerElector = localListener.getElector();
if (localListenerElector != null && !isBuddyReplicationEnabled) {
// going to use the local listener elector instead, which gives results based on data
performTakeOver(localListener,oldMember,localAddress, true, isBuddyReplicationEnabled);
}
else {
List<Address> electionView = getElectionView(oldMember);
if(electionView!=null && elector.elect(electionView).equals(localAddress))
{
performTakeOver(localListener, oldMember, localAddress, false, isBuddyReplicationEnabled);
}
cleanAfterTakeOver(localListener, oldMember);
}
}
}
}
}
};
Thread t = new Thread(runnable);
t.start();
}
} | java | {
"resource": ""
} |
q10088 | appfwpolicy_stats.get | train | public static appfwpolicy_stats[] get(nitro_service service) throws Exception{
appfwpolicy_stats obj = new appfwpolicy_stats();
appfwpolicy_stats[] response = (appfwpolicy_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q10089 | appfwpolicy_stats.get | train | public static appfwpolicy_stats get(nitro_service service, String name) throws Exception{
appfwpolicy_stats obj = new appfwpolicy_stats();
obj.set_name(name);
appfwpolicy_stats response = (appfwpolicy_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q10090 | pqbinding.get | train | public static pqbinding[] get(nitro_service service, pqbinding_args args) throws Exception{
pqbinding obj = new pqbinding();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
pqbinding[] response = (pqbinding[])obj.get_resources(service, option);
return response;
} | java | {
"resource": ""
} |
q10091 | ObjectArrayList.delete | train | public void delete(Object element, boolean testForEquality) {
int index = indexOfFromTo(element, 0, size-1, testForEquality);
if (index>=0) removeFromTo(index,index);
} | java | {
"resource": ""
} |
q10092 | ObjectArrayList.fillFromToWith | train | public void fillFromToWith(int from, int to, Object val) {
checkRangeFromTo(from,to,this.size);
for (int i=from; i<=to;) setQuick(i++,val);
} | java | {
"resource": ""
} |
q10093 | dnspolicy_dnspolicylabel_binding.get | train | public static dnspolicy_dnspolicylabel_binding[] get(nitro_service service, String name) throws Exception{
dnspolicy_dnspolicylabel_binding obj = new dnspolicy_dnspolicylabel_binding();
obj.set_name(name);
dnspolicy_dnspolicylabel_binding response[] = (dnspolicy_dnspolicylabel_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10094 | tmtrafficpolicy_tmglobal_binding.get | train | public static tmtrafficpolicy_tmglobal_binding[] get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_tmglobal_binding obj = new tmtrafficpolicy_tmglobal_binding();
obj.set_name(name);
tmtrafficpolicy_tmglobal_binding response[] = (tmtrafficpolicy_tmglobal_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10095 | clusternodegroup_nslimitidentifier_binding.get | train | public static clusternodegroup_nslimitidentifier_binding[] get(nitro_service service, String name) throws Exception{
clusternodegroup_nslimitidentifier_binding obj = new clusternodegroup_nslimitidentifier_binding();
obj.set_name(name);
clusternodegroup_nslimitidentifier_binding response[] = (clusternodegroup_nslimitidentifier_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10096 | rewritepolicylabel_rewritepolicy_binding.get | train | public static rewritepolicylabel_rewritepolicy_binding[] get(nitro_service service, String labelname) throws Exception{
rewritepolicylabel_rewritepolicy_binding obj = new rewritepolicylabel_rewritepolicy_binding();
obj.set_labelname(labelname);
rewritepolicylabel_rewritepolicy_binding response[] = (rewritepolicylabel_rewritepolicy_binding[]) obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q10097 | appfwhtmlerrorpage.get | train | public static appfwhtmlerrorpage get(nitro_service service, options option) throws Exception{
appfwhtmlerrorpage obj = new appfwhtmlerrorpage();
appfwhtmlerrorpage[] response = (appfwhtmlerrorpage[])obj.get_resources(service,option);
return response[0];
} | java | {
"resource": ""
} |
q10098 | appfwhtmlerrorpage.get | train | public static appfwhtmlerrorpage get(nitro_service service, String name) throws Exception{
appfwhtmlerrorpage obj = new appfwhtmlerrorpage();
obj.set_name(name);
appfwhtmlerrorpage response = (appfwhtmlerrorpage) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q10099 | authenticationvserver_stats.get | train | public static authenticationvserver_stats[] get(nitro_service service) throws Exception{
authenticationvserver_stats obj = new authenticationvserver_stats();
authenticationvserver_stats[] response = (authenticationvserver_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.