Tabnine Logo
NodeDto.getId
Code IndexAdd Tabnine to your IDE (free)

How to use
getId
method
in
com.enioka.api.admin.NodeDto

Best Java code snippets using com.enioka.api.admin.NodeDto.getId (Showing top 7 results out of 315)

origin: com.enioka.jqm/jqm-admin

public static void syncNodes(DbConn cnx, List<NodeDto> dtos)
{
  for (NodeDto existing : getNodes(cnx))
  {
    boolean foundInNewSet = false;
    for (NodeDto newdto : dtos)
    {
      if (newdto.getId() != null && newdto.getId().equals(existing.getId()))
      {
        foundInNewSet = true;
        break;
      }
    }
    if (!foundInNewSet)
    {
      deleteQueue(cnx, existing.getId());
    }
  }
  for (NodeDto dto : dtos)
  {
    upsertNode(cnx, dto);
  }
}
origin: enioka/jqm

public static void syncNodes(DbConn cnx, List<NodeDto> dtos)
{
  for (NodeDto existing : getNodes(cnx))
  {
    boolean foundInNewSet = false;
    for (NodeDto newdto : dtos)
    {
      if (newdto.getId() != null && newdto.getId().equals(existing.getId()))
      {
        foundInNewSet = true;
        break;
      }
    }
    if (!foundInNewSet)
    {
      deleteQueue(cnx, existing.getId());
    }
  }
  for (NodeDto dto : dtos)
  {
    upsertNode(cnx, dto);
  }
}
origin: enioka/jqm

for (QueueMappingDto mapping : mappings)
  if (mapping.getNodeId().equals(template.getId()))
    r.setNodeId(target.getId());
    r.setNodeName(target.getName());
    r.setPollingInterval(mapping.getPollingInterval());
    toAdd.add(r);
  if (mapping.getNodeId().equals(target.getId()))
origin: com.enioka.jqm/jqm-service

for (QueueMappingDto mapping : mappings)
  if (mapping.getNodeId().equals(template.getId()))
    r.setNodeId(target.getId());
    r.setNodeName(target.getName());
    r.setPollingInterval(mapping.getPollingInterval());
    toAdd.add(r);
  if (mapping.getNodeId().equals(target.getId()))
origin: enioka/jqm

  @Test
  public void testTemplate() throws Exception
  {
    NodeDto template = MetaService.getNode(cnx, TestHelpers.nodeMix.getId());
    template.setPort(123);
    MetaService.upsertNode(cnx, template);
    cnx.commit();

    NodeDto target = MetaService.getNode(cnx, TestHelpers.node.getId());
    Assert.assertEquals(3, MetaService.getNodeQueueMappings(cnx, target.getId()).size());

    // Capital letter -> should be ignored.
    Main.runCommand(new String[] { "Install-NodeTemPlate", "-t", TestHelpers.nodeMix.getName(), "-n", TestHelpers.node.getName() });

    target = MetaService.getNode(cnx, TestHelpers.node.getId());

    Assert.assertEquals(template.getPort(), target.getPort());
    Assert.assertEquals(1, MetaService.getNodeQueueMappings(cnx, target.getId()).size());
  }
}
origin: com.enioka.jqm/jqm-admin

public static void upsertNode(DbConn cnx, NodeDto dto)
{
  if (dto.getId() != null)
  {
    QueryResult qr = cnx.runUpdate("node_update_changed_by_id", dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(),
        dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(),
        dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory(),
        dto.getId(), dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(),
        dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(),
        dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory());
    if (qr.nbUpdated != 1)
    {
      jqmlogger.debug("No update was done as object either does not exist or no modifications were done");
    }
  }
  else
  {
    // Should actually never be used... nodes should be created through CLI.
    Node.create(cnx, dto.getName(), dto.getPort(), dto.getOutputDirectory(), dto.getJobRepoDirectory(), dto.getTmpDirectory(),
        dto.getDns(), dto.getRootLogLevel());
  }
}
origin: enioka/jqm

public static void upsertNode(DbConn cnx, NodeDto dto)
{
  if (dto.getId() != null)
  {
    QueryResult qr = cnx.runUpdate("node_update_changed_by_id", dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(),
        dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(),
        dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory(),
        dto.getId(), dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(),
        dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(),
        dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory());
    if (qr.nbUpdated != 1)
    {
      jqmlogger.debug("No update was done as object either does not exist or no modifications were done");
    }
  }
  else
  {
    // Should actually never be used... nodes should be created through CLI.
    Node.create(cnx, dto.getName(), dto.getPort(), dto.getOutputDirectory(), dto.getJobRepoDirectory(), dto.getTmpDirectory(),
        dto.getDns(), dto.getRootLogLevel());
  }
}
com.enioka.api.adminNodeDtogetId

Popular methods of NodeDto

  • getDns
  • getEnabled
  • getJmxRegistryPort
  • getJmxServerPort
  • getJobRepoDirectory
  • getLoadApiAdmin
  • getLoadApiClient
  • getLoapApiSimple
  • getName
  • getOutputDirectory
  • getPort
  • getRootLogLevel
  • getPort,
  • getRootLogLevel,
  • getTmpDirectory,
  • setPort,
  • setDns,
  • setEnabled,
  • setJmxRegistryPort,
  • setJmxServerPort,
  • setJobRepoDirectory

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now