code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public int[] bestSequence(SequenceModel ts) {
int[] sample = new int[ts.length()+ts.leftWindow()];
for (int pos = ts.leftWindow(); pos < sample.length; pos++) {
double[] scores = ts.scoresOf(sample, pos);
double total = 0.0;
for (int i = 0; i < scores.length; i++) {
score... | java |
public static auditnslogpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
auditnslogpolicy_csvserver_binding obj = new auditnslogpolicy_csvserver_binding();
obj.set_name(name);
auditnslogpolicy_csvserver_binding response[] = (auditnslogpolicy_csvserver_binding[]) obj.get_resourc... | java |
public static authenticationcertpolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
authenticationcertpolicy_vpnglobal_binding obj = new authenticationcertpolicy_vpnglobal_binding();
obj.set_name(name);
authenticationcertpolicy_vpnglobal_binding response[] = (authenticationcertpol... | java |
public static base_response create(nitro_service client, sslcertreq resource) throws Exception {
sslcertreq createresource = new sslcertreq();
createresource.reqfile = resource.reqfile;
createresource.keyfile = resource.keyfile;
createresource.fipskeyname = resource.fipskeyname;
createresource.keyform = resou... | java |
public static snmpoid[] get(nitro_service service, snmpoid_args args) throws Exception{
snmpoid obj = new snmpoid();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
snmpoid[] response = (snmpoid[])obj.get_resources(service, option);
return response;
} | java |
int toMatchDoc() throws IOException {
while (true) {
if (findMatches()) {
return docID();
}
resetQueue();
if (spans.nextDoc() == NO_MORE_DOCS) {
return NO_MORE_DOCS;
}
}
} | java |
private boolean collectSpan() throws IOException {
if (lastSpan) {
return false;
} else if (spans.nextStartPosition() == NO_MORE_POSITIONS) {
lastSpan = true;
return false;
} else {
queueSpans.add(new Match(spans.startPosition(), spans.endPosition()));
lastStartPosition = spans... | java |
private List<Match> expandWithIgnoreItem(int docId, Match match) {
List<Match> list = new ArrayList<>();
try {
Set<Integer> ignoreList = ignoreItem.getFullEndPositionList(docId,
match.endPosition);
if (ignoreList != null) {
for (Integer endPosition : ignoreList) {
list.ad... | java |
public static csvserver_binding get(nitro_service service, String name) throws Exception{
csvserver_binding obj = new csvserver_binding();
obj.set_name(name);
csvserver_binding response = (csvserver_binding) obj.get_resource(service);
return response;
} | java |
public static transformglobal_binding get(nitro_service service) throws Exception{
transformglobal_binding obj = new transformglobal_binding();
transformglobal_binding response = (transformglobal_binding) obj.get_resource(service);
return response;
} | java |
public static aaagroup_vpnurl_binding[] get(nitro_service service, String groupname) throws Exception{
aaagroup_vpnurl_binding obj = new aaagroup_vpnurl_binding();
obj.set_groupname(groupname);
aaagroup_vpnurl_binding response[] = (aaagroup_vpnurl_binding[]) obj.get_resources(service);
return response;
} | java |
final public void addList(ArrayList<MtasTreeHit<T>> list) {
if (list != null) {
lists.add(list);
}
} | java |
private void constructTokenCollection(final Reader reader)
throws MtasConfigException, MtasParserException {
tokenCollection = null;
try {
Constructor<?> c = Class.forName(parserName)
.getDeclaredConstructor(MtasConfiguration.class);
Object p = c.newInstance(parserConfiguration... | java |
private void readConfigurationFile(final String configFile) {
InputStream is;
try {
is = new FileInputStream(configFile);
processConfiguration(MtasConfiguration.readConfiguration(is));
is.close();
} catch (FileNotFoundException e) {
log.error("Couldn't find " + configFile, e);
} ... | java |
private void processConfiguration(final MtasConfiguration config)
throws IOException {
HashMap<String, Integer> indexEncodingMapper = new HashMap<>();
indexEncodingMapper.put("payload", MtasPayloadEncoder.ENCODE_PAYLOAD);
indexEncodingMapper.put("offset", MtasPayloadEncoder.ENCODE_OFFSET);
indexEn... | java |
public static String encode(String str)
{
try
{
return java.net.URLEncoder.encode(str, "UTF-8");
}
catch(java.io.UnsupportedEncodingException ue)
{
return str;
}
} | java |
public static base_response update(nitro_service client, aaatacacsparams resource) throws Exception {
aaatacacsparams updateresource = new aaatacacsparams();
updateresource.serverip = resource.serverip;
updateresource.serverport = resource.serverport;
updateresource.authtimeout = resource.authtimeout;
updater... | java |
public static base_response unset(nitro_service client, aaatacacsparams resource, String[] args) throws Exception{
aaatacacsparams unsetresource = new aaatacacsparams();
return unsetresource.unset_resource(client,args);
} | java |
public static aaatacacsparams get(nitro_service service) throws Exception{
aaatacacsparams obj = new aaatacacsparams();
aaatacacsparams[] response = (aaatacacsparams[])obj.get_resources(service);
return response[0];
} | java |
protected void initParser() throws MtasConfigException {
if (config != null) {
// find namespaceURI
for (int i = 0; i < config.children.size(); i++) {
MtasConfiguration current = config.children.get(i);
if (current.name.equals("autorepair")) {
autorepair = current.attributes.ge... | java |
public static base_response add(nitro_service client, bridgegroup resource) throws Exception {
bridgegroup addresource = new bridgegroup();
addresource.id = resource.id;
addresource.ipv6dynamicrouting = resource.ipv6dynamicrouting;
return addresource.add_resource(client);
} | java |
public static base_response update(nitro_service client, bridgegroup resource) throws Exception {
bridgegroup updateresource = new bridgegroup();
updateresource.id = resource.id;
updateresource.ipv6dynamicrouting = resource.ipv6dynamicrouting;
return updateresource.update_resource(client);
} | java |
public static base_responses update(nitro_service client, bridgegroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
bridgegroup updateresources[] = new bridgegroup[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] =... | java |
public static bridgegroup[] get(nitro_service service) throws Exception{
bridgegroup obj = new bridgegroup();
bridgegroup[] response = (bridgegroup[])obj.get_resources(service);
return response;
} | java |
public static bridgegroup get(nitro_service service, Long id) throws Exception{
bridgegroup obj = new bridgegroup();
obj.set_id(id);
bridgegroup response = (bridgegroup) obj.get_resource(service);
return response;
} | java |
public static tmtrafficpolicy_stats[] get(nitro_service service) throws Exception{
tmtrafficpolicy_stats obj = new tmtrafficpolicy_stats();
tmtrafficpolicy_stats[] response = (tmtrafficpolicy_stats[])obj.stat_resources(service);
return response;
} | java |
public static tmtrafficpolicy_stats get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_stats obj = new tmtrafficpolicy_stats();
obj.set_name(name);
tmtrafficpolicy_stats response = (tmtrafficpolicy_stats) obj.stat_resource(service);
return response;
} | java |
public static cmppolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
cmppolicy_lbvserver_binding obj = new cmppolicy_lbvserver_binding();
obj.set_name(name);
cmppolicy_lbvserver_binding response[] = (cmppolicy_lbvserver_binding[]) obj.get_resources(service);
return response;
} | java |
public static base_response add(nitro_service client, lbmetrictable resource) throws Exception {
lbmetrictable addresource = new lbmetrictable();
addresource.metrictable = resource.metrictable;
return addresource.add_resource(client);
} | java |
public static base_responses add(nitro_service client, lbmetrictable resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
lbmetrictable addresources[] = new lbmetrictable[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = ne... | java |
public static base_response delete(nitro_service client, lbmetrictable resource) throws Exception {
lbmetrictable deleteresource = new lbmetrictable();
deleteresource.metrictable = resource.metrictable;
return deleteresource.delete_resource(client);
} | java |
public static base_responses delete(nitro_service client, String metrictable[]) throws Exception {
base_responses result = null;
if (metrictable != null && metrictable.length > 0) {
lbmetrictable deleteresources[] = new lbmetrictable[metrictable.length];
for (int i=0;i<metrictable.length;i++){
deleteresou... | java |
public static base_response update(nitro_service client, lbmetrictable resource) throws Exception {
lbmetrictable updateresource = new lbmetrictable();
updateresource.metrictable = resource.metrictable;
updateresource.metric = resource.metric;
updateresource.Snmpoid = resource.Snmpoid;
return updateresource.u... | java |
public static base_responses update(nitro_service client, lbmetrictable resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
lbmetrictable updateresources[] = new lbmetrictable[resources.length];
for (int i=0;i<resources.length;i++){
updateresource... | java |
public static lbmetrictable[] get(nitro_service service) throws Exception{
lbmetrictable obj = new lbmetrictable();
lbmetrictable[] response = (lbmetrictable[])obj.get_resources(service);
return response;
} | java |
public static lbmetrictable get(nitro_service service, String metrictable) throws Exception{
lbmetrictable obj = new lbmetrictable();
obj.set_metrictable(metrictable);
lbmetrictable response = (lbmetrictable) obj.get_resource(service);
return response;
} | java |
public static lbmetrictable[] get(nitro_service service, String metrictable[]) throws Exception{
if (metrictable !=null && metrictable.length>0) {
lbmetrictable response[] = new lbmetrictable[metrictable.length];
lbmetrictable obj[] = new lbmetrictable[metrictable.length];
for (int i=0;i<metrictable.length;i... | java |
public static cspolicylabel_binding get(nitro_service service, String labelname) throws Exception{
cspolicylabel_binding obj = new cspolicylabel_binding();
obj.set_labelname(labelname);
cspolicylabel_binding response = (cspolicylabel_binding) obj.get_resource(service);
return response;
} | java |
public static vpnvserver_authenticationcertpolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_authenticationcertpolicy_binding obj = new vpnvserver_authenticationcertpolicy_binding();
obj.set_name(name);
vpnvserver_authenticationcertpolicy_binding response[] = (vpnvserver_authen... | java |
public static vpnglobal_authenticationlocalpolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_authenticationlocalpolicy_binding obj = new vpnglobal_authenticationlocalpolicy_binding();
vpnglobal_authenticationlocalpolicy_binding response[] = (vpnglobal_authenticationlocalpolicy_binding[]) obj.g... | java |
public static rewritepolicy_binding get(nitro_service service, String name) throws Exception{
rewritepolicy_binding obj = new rewritepolicy_binding();
obj.set_name(name);
rewritepolicy_binding response = (rewritepolicy_binding) obj.get_resource(service);
return response;
} | java |
public static Interface_stats[] get(nitro_service service) throws Exception{
Interface_stats obj = new Interface_stats();
Interface_stats[] response = (Interface_stats[])obj.stat_resources(service);
return response;
} | java |
public static Interface_stats get(nitro_service service, String id) throws Exception{
Interface_stats obj = new Interface_stats();
obj.set_id(id);
Interface_stats response = (Interface_stats) obj.stat_resource(service);
return response;
} | java |
public static service_lbmonitor_binding[] get(nitro_service service, String name) throws Exception{
service_lbmonitor_binding obj = new service_lbmonitor_binding();
obj.set_name(name);
service_lbmonitor_binding response[] = (service_lbmonitor_binding[]) obj.get_resources(service);
return response;
} | java |
public static rewritepolicy_rewriteglobal_binding[] get(nitro_service service, String name) throws Exception{
rewritepolicy_rewriteglobal_binding obj = new rewritepolicy_rewriteglobal_binding();
obj.set_name(name);
rewritepolicy_rewriteglobal_binding response[] = (rewritepolicy_rewriteglobal_binding[]) obj.get_re... | java |
public static base_response update(nitro_service client, nshostname resource) throws Exception {
nshostname updateresource = new nshostname();
updateresource.hostname = resource.hostname;
updateresource.ownernode = resource.ownernode;
return updateresource.update_resource(client);
} | java |
public static base_responses update(nitro_service client, nshostname resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nshostname updateresources[] = new nshostname[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = ne... | java |
public static nshostname[] get(nitro_service service, options option) throws Exception{
nshostname obj = new nshostname();
nshostname[] response = (nshostname[])obj.get_resources(service,option);
return response;
} | java |
public static tmsessionpolicy_aaauser_binding[] get(nitro_service service, String name) throws Exception{
tmsessionpolicy_aaauser_binding obj = new tmsessionpolicy_aaauser_binding();
obj.set_name(name);
tmsessionpolicy_aaauser_binding response[] = (tmsessionpolicy_aaauser_binding[]) obj.get_resources(service);
... | java |
public static authenticationtacacspolicy_binding get(nitro_service service, String name) throws Exception{
authenticationtacacspolicy_binding obj = new authenticationtacacspolicy_binding();
obj.set_name(name);
authenticationtacacspolicy_binding response = (authenticationtacacspolicy_binding) obj.get_resource(serv... | java |
public static void main(String[] args) {
//TreeFactory tf = new LabeledScoredTreeFactory();
Tree stringyTree = null;
try {
stringyTree = (new PennTreeReader(new StringReader("(S (VP (VBZ Try) (NP (DT this))) (. .))"), new LabeledScoredTreeFactory(new StringLabelFactory()))).readTree();
} catc... | java |
@Override
protected String cleanUpLabel(String label) {
if (label == null) {
return "ROOT";
// String constants are always interned
} else if (leaveItAll == 1) {
return tlp.categoryAndFunction(label);
} else if (leaveItAll == 2) {
return label;
} else {
boolean ... | java |
private void addTMP9(final Tree tree) {
// do the head chain under it
Tree ht = headFinder.determineHead(tree);
// special fix for possessives! -- make noun before head
if (ht.value().equals("POS")) {
int j = tree.indexOf(ht);
if (j > 0) {
ht = tree.getChild(j - 1);
}
... | java |
public static transformpolicylabel_stats[] get(nitro_service service) throws Exception{
transformpolicylabel_stats obj = new transformpolicylabel_stats();
transformpolicylabel_stats[] response = (transformpolicylabel_stats[])obj.stat_resources(service);
return response;
} | java |
public static transformpolicylabel_stats get(nitro_service service, String labelname) throws Exception{
transformpolicylabel_stats obj = new transformpolicylabel_stats();
obj.set_labelname(labelname);
transformpolicylabel_stats response = (transformpolicylabel_stats) obj.stat_resource(service);
return response;... | java |
private void makeUnique() {
HashMap<String, ArrayList<MtasToken>> currentPositionTokens = new HashMap<>();
ArrayList<MtasToken> currentValueTokens;
int currentStartPosition = -1;
MtasToken currentToken = null;
for (Entry<Integer, MtasToken> entry : tokenCollection.entrySet()) {
currentToken = ... | java |
private void checkTokenCollectionIndex() throws MtasParserException {
if (tokenCollectionIndex.size() != tokenCollection.size()) {
MtasToken token;
Integer maxId = null;
Integer minId = null;
tokenCollectionIndex.clear();
for (Entry<Integer, MtasToken> entry : tokenCollection.entrySet(... | java |
public Comparator<Integer> getCompByName() {
return new Comparator<Integer>() {
@Override
public int compare(Integer t1, Integer t2) {
Integer p1 = tokenCollection.get(t1).getPositionStart();
Integer p2 = tokenCollection.get(t2).getPositionStart();
assert p1 != null : "no positio... | java |
public final void updateKey(String key) throws IOException {
Objects.requireNonNull(key, "old key required");
if (index.containsKey(key)) {
MtasSolrStatus status = index.get(key);
index.remove(key);
if (!index.containsKey(status.key())) {
index.put(status.key(), status);
} else {... | java |
public SimpleOrderedMap<Object> createListOutput(boolean shardRequests, int maxNumber) {
garbageCollect();
SimpleOrderedMap<Object> output = new SimpleOrderedMap<>();
output.add(NAME_ENABLED, enabled());
output.add(NAME_ENABLED, true);
int numberTotal = data.size();
ListData listData = new ListD... | java |
public static tmtrafficpolicy_binding get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_binding obj = new tmtrafficpolicy_binding();
obj.set_name(name);
tmtrafficpolicy_binding response = (tmtrafficpolicy_binding) obj.get_resource(service);
return response;
} | java |
public static dnsglobal_dnspolicy_binding[] get(nitro_service service) throws Exception{
dnsglobal_dnspolicy_binding obj = new dnsglobal_dnspolicy_binding();
dnsglobal_dnspolicy_binding response[] = (dnsglobal_dnspolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static dnspolicy_binding get(nitro_service service, String name) throws Exception{
dnspolicy_binding obj = new dnspolicy_binding();
obj.set_name(name);
dnspolicy_binding response = (dnspolicy_binding) obj.get_resource(service);
return response;
} | java |
public static gslbservice_lbmonitor_binding[] get(nitro_service service, String servicename) throws Exception{
gslbservice_lbmonitor_binding obj = new gslbservice_lbmonitor_binding();
obj.set_servicename(servicename);
gslbservice_lbmonitor_binding response[] = (gslbservice_lbmonitor_binding[]) obj.get_resources(s... | java |
public static base_response add(nitro_service client, nstcpprofile resource) throws Exception {
nstcpprofile addresource = new nstcpprofile();
addresource.name = resource.name;
addresource.ws = resource.ws;
addresource.sack = resource.sack;
addresource.wsval = resource.wsval;
addresource.nagle = resource.na... | java |
public static base_response update(nitro_service client, nstcpprofile resource) throws Exception {
nstcpprofile updateresource = new nstcpprofile();
updateresource.name = resource.name;
updateresource.ws = resource.ws;
updateresource.sack = resource.sack;
updateresource.wsval = resource.wsval;
updateresourc... | java |
public static base_responses update(nitro_service client, nstcpprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nstcpprofile updateresources[] = new nstcpprofile[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i... | java |
public static nstcpprofile[] get(nitro_service service) throws Exception{
nstcpprofile obj = new nstcpprofile();
nstcpprofile[] response = (nstcpprofile[])obj.get_resources(service);
return response;
} | java |
public static nstcpprofile get(nitro_service service, String name) throws Exception{
nstcpprofile obj = new nstcpprofile();
obj.set_name(name);
nstcpprofile response = (nstcpprofile) obj.get_resource(service);
return response;
} | java |
public static transformglobal_transformpolicy_binding[] get(nitro_service service) throws Exception{
transformglobal_transformpolicy_binding obj = new transformglobal_transformpolicy_binding();
transformglobal_transformpolicy_binding response[] = (transformglobal_transformpolicy_binding[]) obj.get_resources(service... | java |
public static bridge_stats get(nitro_service service) throws Exception{
bridge_stats obj = new bridge_stats();
bridge_stats[] response = (bridge_stats[])obj.stat_resources(service);
return response[0];
} | java |
public static systementity[] get(nitro_service service, systementity_args args) throws Exception{
systementity obj = new systementity();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
systementity[] response = (systementity[])obj.get_resources(service, option);... | java |
public static vpnglobal_vpnclientlessaccesspolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_vpnclientlessaccesspolicy_binding obj = new vpnglobal_vpnclientlessaccesspolicy_binding();
vpnglobal_vpnclientlessaccesspolicy_binding response[] = (vpnglobal_vpnclientlessaccesspolicy_binding[]) obj.g... | java |
public static vpnglobal_vpnclientlessaccesspolicy_binding[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
vpnglobal_vpnclientlessaccesspolicy_binding obj = new vpnglobal_vpnclientlessaccesspolicy_binding();
options option = new options();
option.set_filter(filter);
vpnglobal_vpncli... | java |
public static vrid_interface_binding[] get(nitro_service service, Long id) throws Exception{
vrid_interface_binding obj = new vrid_interface_binding();
obj.set_id(id);
vrid_interface_binding response[] = (vrid_interface_binding[]) obj.get_resources(service);
return response;
} | java |
public static Tree CCtransform(Tree t) {
boolean notDone = true;
while (notDone) {
Tree cc = findCCparent(t, t);
if (cc != null) {
t = cc;
} else {
notDone = false;
}
}
return t;
} | java |
public static vpnvserver_authenticationtacacspolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_authenticationtacacspolicy_binding obj = new vpnvserver_authenticationtacacspolicy_binding();
obj.set_name(name);
vpnvserver_authenticationtacacspolicy_binding response[] = (vpnvserve... | java |
public static base_response add(nitro_service client, ipsecprofile resource) throws Exception {
ipsecprofile addresource = new ipsecprofile();
addresource.name = resource.name;
addresource.ikeversion = resource.ikeversion;
addresource.encalgo = resource.encalgo;
addresource.hashalgo = resource.hashalgo;
add... | java |
public static base_responses add(nitro_service client, ipsecprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
ipsecprofile addresources[] = new ipsecprofile[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new i... | java |
public static ipsecprofile[] get(nitro_service service) throws Exception{
ipsecprofile obj = new ipsecprofile();
ipsecprofile[] response = (ipsecprofile[])obj.get_resources(service);
return response;
} | java |
public static ipsecprofile get(nitro_service service, String name) throws Exception{
ipsecprofile obj = new ipsecprofile();
obj.set_name(name);
ipsecprofile response = (ipsecprofile) obj.get_resource(service);
return response;
} | java |
public static base_response add(nitro_service client, authenticationauthnprofile resource) throws Exception {
authenticationauthnprofile addresource = new authenticationauthnprofile();
addresource.name = resource.name;
addresource.authnvsname = resource.authnvsname;
addresource.authenticationhost = resource.aut... | java |
public static base_responses add(nitro_service client, authenticationauthnprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
authenticationauthnprofile addresources[] = new authenticationauthnprofile[resources.length];
for (int i=0;i<resource... | java |
public static base_response update(nitro_service client, authenticationauthnprofile resource) throws Exception {
authenticationauthnprofile updateresource = new authenticationauthnprofile();
updateresource.name = resource.name;
updateresource.authnvsname = resource.authnvsname;
updateresource.authenticationhost... | java |
public static base_responses update(nitro_service client, authenticationauthnprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
authenticationauthnprofile updateresources[] = new authenticationauthnprofile[resources.length];
for (int i=0;i<re... | java |
public static authenticationauthnprofile[] get(nitro_service service) throws Exception{
authenticationauthnprofile obj = new authenticationauthnprofile();
authenticationauthnprofile[] response = (authenticationauthnprofile[])obj.get_resources(service);
return response;
} | java |
public static authenticationauthnprofile get(nitro_service service, String name) throws Exception{
authenticationauthnprofile obj = new authenticationauthnprofile();
obj.set_name(name);
authenticationauthnprofile response = (authenticationauthnprofile) obj.get_resource(service);
return response;
} | java |
public static tmsessionpolicy[] get(nitro_service service) throws Exception{
tmsessionpolicy obj = new tmsessionpolicy();
tmsessionpolicy[] response = (tmsessionpolicy[])obj.get_resources(service);
return response;
} | java |
public static tmsessionpolicy get(nitro_service service, String name) throws Exception{
tmsessionpolicy obj = new tmsessionpolicy();
obj.set_name(name);
tmsessionpolicy response = (tmsessionpolicy) obj.get_resource(service);
return response;
} | java |
public void schedule(TimerTask task, boolean checkIfAlreadyPresent) {
final TimerTaskData taskData = task.getData();
final Serializable taskID = taskData.getTaskID();
task.setScheduler(this);
if (logger.isDebugEnabled()) {
logger.debug("Scheduling task with id " + taskID);
}
// store the task a... | java |
public TimerTask cancel(Serializable taskID) {
if (logger.isDebugEnabled()) {
logger.debug("Canceling task with timer id "+taskID);
}
TimerTask task = localRunningTasks.get(taskID);
if (task != null) {
// remove task data
new TimerTaskCacheData(taskID, baseFqn, cluster).remove();
final SetTim... | java |
private void recover(TimerTaskData taskData) {
TimerTask task = timerTaskFactory.newTimerTask(taskData);
if(task != null) {
if (logger.isDebugEnabled()) {
logger.debug("Recovering task with id "+taskData.getTaskID());
}
task.beforeRecover();
// on recovery the task will already be in the cache so we... | java |
public static transformprofile_binding get(nitro_service service, String name) throws Exception{
transformprofile_binding obj = new transformprofile_binding();
obj.set_name(name);
transformprofile_binding response = (transformprofile_binding) obj.get_resource(service);
return response;
} | java |
public static base_response add(nitro_service client, nslimitidentifier resource) throws Exception {
nslimitidentifier addresource = new nslimitidentifier();
addresource.limitidentifier = resource.limitidentifier;
addresource.threshold = resource.threshold;
addresource.timeslice = resource.timeslice;
addresou... | java |
public static base_responses add(nitro_service client, nslimitidentifier resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nslimitidentifier addresources[] = new nslimitidentifier[resources.length];
for (int i=0;i<resources.length;i++){
addresou... | java |
public static base_response delete(nitro_service client, String limitidentifier) throws Exception {
nslimitidentifier deleteresource = new nslimitidentifier();
deleteresource.limitidentifier = limitidentifier;
return deleteresource.delete_resource(client);
} | java |
public static base_responses delete(nitro_service client, String limitidentifier[]) throws Exception {
base_responses result = null;
if (limitidentifier != null && limitidentifier.length > 0) {
nslimitidentifier deleteresources[] = new nslimitidentifier[limitidentifier.length];
for (int i=0;i<limitidentifier.... | java |
public static base_response update(nitro_service client, nslimitidentifier resource) throws Exception {
nslimitidentifier updateresource = new nslimitidentifier();
updateresource.limitidentifier = resource.limitidentifier;
updateresource.threshold = resource.threshold;
updateresource.timeslice = resource.timesl... | java |
public static base_responses update(nitro_service client, nslimitidentifier resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nslimitidentifier updateresources[] = new nslimitidentifier[resources.length];
for (int i=0;i<resources.length;i++){
up... | java |
public static base_response unset(nitro_service client, nslimitidentifier resource, String[] args) throws Exception{
nslimitidentifier unsetresource = new nslimitidentifier();
unsetresource.limitidentifier = resource.limitidentifier;
return unsetresource.unset_resource(client,args);
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.