Package org.sonatype.nexus.obr.metadata

Examples of org.sonatype.nexus.obr.metadata.ObrResourceWriter.complete()


          else {
            writer.append(i);
          }
        }

        writer.complete(); // the OBR is only updated once the stream is complete and closed
      }
      catch (final IOException e) {
        throw new StorageException(e);
      }
      finally {
View Full Code Here


      writer.flush();
    }

    assertEquals(2710, bundles.size());

    writer.complete();
    writer.close();

    reader = obrMetadataSource.getReader(openObrSite(uid));
    while ((r = reader.readResource()) != null) {
      assertTrue(bundles.remove(r));
View Full Code Here

      writer.append(r);
      writer.flush();
    }

    reader.close();
    writer.complete();
    writer.close();

    reader = obrMetadataSource.getReader(openObrSite(uid2));
    writer = obrMetadataSource.getWriter(uid3);
View Full Code Here

    while ((r = reader.readResource()) != null) {
      writer.append(r);
    }

    reader.close();
    writer.complete();
    writer.close();

    reader = obrMetadataSource.getReader(openObrSite(uid3));

    while ((r = reader.readResource()) != null) {
View Full Code Here

        writer.append(r);
        writer.flush();
      }

      reader.close();
      writer.complete();
      writer.close();

      if (i > 0) {
        assertEquals(obrToString(uid1), obrToString(uid2));
      }
View Full Code Here

          finally {
            IOUtils.closeQuietly(reader);
          }
        }

        writer.complete(); // the OBR is only updated once the stream is complete and closed
      }
      finally {
        IOUtils.closeQuietly(writer);
      }
View Full Code Here

      final ResourceStoreRequest request = new ResourceStoreRequest("/");
      final DefaultWalkerContext ctx = new DefaultWalkerContext(target, request, new ObrWalkerFilter());
      ctx.getProcessors().add(obrProcessor);
      walker.walk(ctx);

      writer.complete(); // the OBR is only updated once the stream is complete and closed
    }
    catch (final WalkerException e) {
      writer.complete();
    }
    finally {
View Full Code Here

      walker.walk(ctx);

      writer.complete(); // the OBR is only updated once the stream is complete and closed
    }
    catch (final WalkerException e) {
      writer.complete();
    }
    finally {
      IOUtils.closeQuietly(writer);
    }
  }
View Full Code Here

      if (adding) // not seen this resource before
      {
        writer.append(resource);
      }

      writer.complete(); // the OBR is only updated once the stream is complete and closed
    }
    catch (final IOException e) {
      throw new StorageException(e);
    }
    finally {
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.