Examples of Snapshot


Examples of org.lightfish.business.servermonitoring.entity.Snapshot

        String expected = "Free Connections: 42";
        String template = "Free Connections: ${pools[0].numconnfree}";
        List<ConnectionPool> pools = new ArrayList<>();
        pools.add(new ConnectionPool("anything", 42, 24, 1, 1));

        Snapshot snapshot = new Snapshot.Builder().pools(pools).build();
        String result = instance.processBasicMessage(template, snapshot);
        assertEquals(expected, result);
    }
View Full Code Here

Examples of org.lightview.model.Snapshot

    @Override
    public void onOpen(Session session, EndpointConfig ec) {
        session.addMessageHandler(new MessageHandler.Whole<String>() {
            @Override
            public void onMessage(String message) {
                final Snapshot current = deserialize(message);
                Platform.runLater(() ->
                        snapshot.set(current));
            }
        });
    }
View Full Code Here

Examples of org.lightview.view.Snapshot

    }

    private void instantiateViews() {
        this.browser = new Browser();
        ReadOnlyLongProperty id = this.dashboardPresenter.getId();
        this.heap = new Snapshot(id, "Heap Size", "Used Heap");
        this.threadCount = new Snapshot(id, "Thread Count", "Threads");
        this.peakThreadCount = new Snapshot(id, "Peak Thread Count", "Threads");
        this.busyThread = new Snapshot(id, "Busy Thread Count", "Threads");
        this.commitCount = new Snapshot(id, "TX Commit", "#");
        this.rollbackCount = new Snapshot(id, "TX Rollback", "#");
        this.totalErrors = new Snapshot(id, "Errors", "#");
        this.queuedConnections = new Snapshot(id, "Queued Connections", "Connections");
        this.activeSessions = new Snapshot(id, "HTTP Sessions", "#");
        this.expiredSessions = new Snapshot(id, "Expired Sessions", "#");
        this.successfulTXPerf = new Snapshot(id, "Commits Per Second", "#");
        this.failedTXPerf = new Snapshot(id, "Rollbacks Per Second", "#");
        final Node liveStream = new SnapshotTable(this.dashboardPresenter.getSnapshots()).createTable();
        this.escalations = new Escalations(liveStream,this.dashboardPresenter.getEscalationsPresenterBindings());
        this.status = new Status(this.dashboardPresenter.getDeadlockedThreads());
    }
View Full Code Here

Examples of org.moparscape.msc.gs.model.snapshot.Snapshot

      if (lastCleanedChatlogsOutput > 60 * 5) {
        Logger.println("----------------------------------------------");
        Logger.println(world.getSnapshots().size() + " items on deque");
      }
      Iterator<Snapshot> i = world.getSnapshots().descendingIterator();
      Snapshot s = null;
      while (i.hasNext()) {
        s = i.next();
        if (curTime - s.getTimestamp() > 60000) {
          i.remove();
          s = null;
        } else {
          s = null;
        }
View Full Code Here

Examples of org.netbeans.modules.parsing.api.Snapshot

*/
public class CoffeeScriptHTMLParserTask extends ParserResultTask<Result> {

    @Override
    public void run(Result result, SchedulerEvent event) {
        Snapshot snapshot = result.getSnapshot();
        TokenHierarchy<Document> th = TokenHierarchy.get(snapshot.getSource().getDocument(true));
        if (snapshot.getMimeType().equals("text/html")) {
            TokenSequence<HTMLTokenId> ts = th.tokenSequence(HTMLTokenId.language());
            if (ts == null) {
                TokenSequence<?> ets = th.tokenSequence();
                ets.moveStart();
                ets.moveNext();
View Full Code Here

Examples of org.rocksdb.Snapshot

      options.setCreateIfMissing(true);

      db = RocksDB.open(options, dbFolder.getRoot().getAbsolutePath());
      db.put("key".getBytes(), "value".getBytes());
      // Get new Snapshot of database
      Snapshot snapshot = db.getSnapshot();
      readOptions = new ReadOptions();
      // set snapshot in ReadOptions
      readOptions.setSnapshot(snapshot);
      // retrieve key value pair
      assertThat(new String(db.get("key".getBytes()))).
          isEqualTo("value");
      // retrieve key value pair created before
      // the snapshot was made
      assertThat(new String(db.get(readOptions,
          "key".getBytes()))).isEqualTo("value");
      // add new key/value pair
      db.put("newkey".getBytes(), "newvalue".getBytes());
      // using no snapshot the latest db entries
      // will be taken into account
      assertThat(new String(db.get("newkey".getBytes()))).
          isEqualTo("newvalue");
      // snapshopot was created before newkey
      assertThat(db.get(readOptions, "newkey".getBytes())).
          isNull();
      // Retrieve snapshot from read options
      Snapshot sameSnapshot = readOptions.snapshot();
      readOptions.setSnapshot(sameSnapshot);
      // results must be the same with new Snapshot
      // instance using the same native pointer
      assertThat(new String(db.get(readOptions,
          "key".getBytes()))).isEqualTo("value");
View Full Code Here

Examples of org.sonar.api.database.model.Snapshot

  public DbDuplicationsIndex(ResourcePersister resourcePersister, Project currentProject, DuplicationDao dao,
                             String language) {
    this.dao = dao;
    this.resourcePersister = resourcePersister;
    Snapshot currentSnapshot = resourcePersister.getSnapshotOrFail(currentProject);
    Snapshot lastSnapshot = resourcePersister.getLastSnapshot(currentSnapshot, false);
    this.currentProjectSnapshotId = currentSnapshot.getId();
    this.lastSnapshotId = lastSnapshot == null ? null : lastSnapshot.getId();
    this.languageKey = language;
  }
View Full Code Here

Examples of org.voltdb.compiler.deploymentfile.PartitionDetectionType.Snapshot

        // <partition-detection>/<snapshot>
        PartitionDetectionType ppd = factory.createPartitionDetectionType();
        deployment.setPartitionDetection(ppd);
        ppd.setEnabled(m_ppdEnabled);
        Snapshot ppdsnapshot = factory.createPartitionDetectionTypeSnapshot();
        ppd.setSnapshot(ppdsnapshot);
        ppdsnapshot.setPrefix(m_ppdPrefix);

        // <admin-mode>
        // can't be disabled, but only write out the non-default config if
        // requested by a test. otherwise, take the implied defaults (or
        // whatever local cluster overrides on the command line).
View Full Code Here

Examples of org.voltdb.sysprocs.SnapshotRegistry.Snapshot

    @SuppressWarnings("unchecked")
    @Override
    protected void updateStatsRow(Object rowKey, Object[] rowValues) {
        Pair<Snapshot, Table> p = (Pair<Snapshot, Table>) rowKey;
        Snapshot s = p.getFirst();
        Table t = p.getSecond();
        double duration = 0;
        double throughput = 0;
        if (s.timeFinished != 0) {
            duration = (s.timeFinished - s.timeStarted) / 1000.0;
View Full Code Here

Examples of org.voltdb.sysprocs.saverestore.SnapshotUtil.Snapshot

        }

        /*
         * Build a plan for what partitions to pull from which save file
         */
        final Snapshot snapshot = snapshots.values().iterator().next();
        Map<String, Map<File, Set<Integer>>> tableToFilesWithPartitions =
            new TreeMap<String, Map<File, Set<Integer>>>();
        for (String tableName : tables) {
            if (!snapshot.m_tableFiles.containsKey(tableName)) {
                System.err.println("Error: Snapshot does not contain table " + tableName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.