Examples of Revision


Examples of com.google.nigori.common.Revision

        assertTrue("Not registered" + i, nigori.register());
        assertTrue("Not a clean store " + i, nigori.getIndices().isEmpty());

        for (IndexValue iv : testCases) {// once round for each
          final Index index = iv.index;
          final Revision revision = iv.revvalue.getRevision();
          final byte[] value = iv.revvalue.getValue();

          assertTrue("Not put " + i, nigori.put(index, revision, value));
          List<RevValue> revs = nigori.get(index);
          assertFalse("Revisions must exist" + i, revs.isEmpty());
          assertThat(revs, hasItem(iv.revvalue));
          assertEquals("Not one revision " + i, 1, revs.size());
          assertTrue("Not deleted" + i, nigori.delete(index, NULL_DELETE_TOKEN));
          assertNull("Not deleted" + i, nigori.get(index));
          assertFalse("Could redelete", nigori.delete(index, NULL_DELETE_TOKEN));
        }
        // allow them to accumulate
        for (IndexValue iv : testCases) {
          final Index index = iv.index;
          final byte[] value = iv.revvalue.getValue();
          final Revision revision = iv.revvalue.getRevision();
          assertTrue("Not put" + i, nigori.put(index, revision, value));
        }
        try {
          for (IndexValue iv : testCases) {
            final Index index = iv.index;
            final byte[] value = iv.revvalue.getValue();
            final Revision revision = iv.revvalue.getRevision();
            assertArrayEquals("Got different" + i, value, nigori.getRevision(index, revision));
          }
        } finally {
          for (IndexValue iv : testCases) {
            final Index index = iv.index;
View Full Code Here

Examples of com.google.nigori.common.Revision

  public void getRevisions() throws IOException, NigoriCryptographyException, UnauthorisedException {
    NigoriDatastore nigori = getStore();
    try {
      assertTrue("Not registered", nigori.register());
      final Index index = new Index("index");
      final Revision a = new Revision("a");
      final Revision b = new Revision("b");
      assertTrue("Not put", nigori.put(index, a, toBytes("aa")));
      assertTrue("Not put", nigori.put(index, b, toBytes("bb")));
      try {
        List<Revision> revisions = nigori.getRevisions(index);
        assertNotNull("No revisions", revisions);
View Full Code Here

Examples of com.google.nigori.common.Revision

    NigoriDatastore nigori = getStore();
    try {
      assertTrue("Not registered", nigori.register());
      final Index indexa = new Index("indexa");
      final Index indexb = new Index("indexb");
      final Revision revision = new Revision("a");
      assertTrue("Not put", nigori.put(indexa, revision, toBytes("aa")));
      assertTrue("Not put", nigori.put(indexb, revision, toBytes("bb")));
      try {
        List<Index> indices = nigori.getIndices();
        assertNotNull("No indices", indices);
View Full Code Here

Examples of com.google.nigori.common.Revision

      UnauthorisedException {
    NigoriDatastore nigori = getStore();
    try {
      assertTrue("Not registered", nigori.register());
      final Index index = new Index("index");
      final Revision revision = new Revision("rev");
      assertTrue("Not put", nigori.put(index, revision, Util.int2bin(0)));
      assertFalse("Could replace revision value", nigori.put(index, revision, Util.int2bin(1)));
      nigori.delete(index, NULL_DELETE_TOKEN);
    } finally {
      assertTrue("Not unregistered", nigori.unregister());
View Full Code Here

Examples of com.google.nigori.common.Revision

              assertTrue("Not registered" + i, nigori.register());
              try {
                for (IndexValue iv : SetGetDeleteTest.testCases) {// once round for each
                  final Index index = iv.index;
                  final byte[] value = iv.revvalue.getValue();
                  final Revision revision = iv.revvalue.getRevision();
                  assertTrue("Not put" + i, nigori.put(index, revision, value));
                  assertArrayEquals("Got different" + i, value, nigori.getRevision(index, revision));
                  assertTrue("Not deleted " + i, nigori.delete(index, NULL_DELETE_TOKEN));
                  assertNull("Still there after deletion " + i, nigori.get(index));
                }
View Full Code Here

Examples of com.google.nigori.common.Revision

                // check we can do this more than once
                for (IndexValue iv : SetGetDeleteTest.testCases) {// once round for each
                  final Index index = new Index(new byte[16]);
                  r.nextBytes(index.getBytes());// need to generate some different indices
                  final byte[] value = iv.revvalue.getValue();
                  final Revision revision = iv.revvalue.getRevision();
                  assertTrue("Not put" + i, nigori.put(index, revision, value));
                  try {
                    assertArrayEquals("Got different" + i, value, nigori.getRevision(index,
                        revision));
                  } finally {
View Full Code Here

Examples of com.opensymphony.xwork2.util.fs.Revision

        if (isJBossUrl(fileUrl)) {
            String fileName = fileUrl.toString();
            if (LOG.isDebugEnabled()) {
                LOG.debug("Creating revision for URL: " + fileName);
            }
            Revision revision = FileRevision.build(normalizeToFileProtocol(fileUrl));
            files.put(fileName, revision);
        } else {
            super.monitorFile(fileUrl);
        }
    }
View Full Code Here

Examples of com.redhat.rcm.maven.plugin.buildmetadata.scm.Revision

    final boolean failOnMissingRevision = scmControl.isFailOnMissingRevision();

    final RevisionNumberFetcher revisionFetcher =
        new MavenScmRevisionNumberFetcher(scmManager, scmConnectionInfo,
            scmAccessInfo);
    final Revision revision = revisionFetcher.fetchLatestRevisionNumber();
    if (revision != null)
    {
      buildMetaDataProperties.setProperty(Constant.PROP_NAME_SCM_URL,
          scmConnectionInfo.getConnectionUrl());
      final String revisionId = revision.getId();
      buildMetaDataProperties.setProperty(Constant.PROP_NAME_SCM_REVISION_ID,
          revisionId);
      final Date revisionDate = revision.getDate();
      final DateFormat format =
          new SimpleDateFormat(buildDatePattern, Locale.ENGLISH);
      final String revisionDateString = format.format(revisionDate);
      buildMetaDataProperties.setProperty(Constant.PROP_NAME_SCM_REVISION_DATE,
          revisionDateString);
View Full Code Here

Examples of com.redhat.rcm.maven.plugin.buildmetadata.scm.Revision

              scmConnectionInfo.createRepository(scmManager);
      final ScmProvider provider = createScmProvider(repository);
      final ChangeLogScmResult result =
              scmAccessInfo.fetchChangeLog(repository, provider);

      Revision revision = null;

      if (result != null && result.isSuccess())
      {
          final List<ChangeSet> changeLogSets = result.getChangeLog().getChangeSets();
View Full Code Here

Examples of de.zib.scalaris.examples.wikipedia.data.Revision

                    System.err.println("Unknown restriction: " + restrictions_array[i]);
                }
            }
        }
        // get current revision (the largest one):
        Revision curRev = null;
        if (!revisions.isEmpty()) {
            curRev = revisions.lastEntry().getValue();
            curRev.setUnpackedText(lastRevText);
        }
        final_page = new Page(title,
                Integer.parseInt(id), redirect, restrictions_map, curRev);
    }
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.