Codota Logo
StreamyBytesPersistentOutputStream.getFileName
Code IndexAdd Codota to your IDE (free)

How to use
getFileName
method
in
com.ning.billing.meter.timeline.persistent.StreamyBytesPersistentOutputStream

Best Java code snippets using com.ning.billing.meter.timeline.persistent.StreamyBytesPersistentOutputStream.getFileName (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: com.ning.billing/killbill-meter

private void flushUnderlyingBufferAndReset() {
  synchronized (inputBuffer) {
    if (inputBuffer.available() == 0) {
      // Somebody beat you to it
      return;
    }
    final String pathname = getFileName();
    createdFiles.add(pathname);
    log.debug("Flushing in-memory buffer to disk: {}", pathname);
    try {
      final File out = new File(pathname);
      flushToFile(out);
    } catch (IOException e) {
      log.warn("Error flushing data", e);
    } finally {
      reset();
    }
  }
}
origin: com.ning.billing/killbill-meter

  @Test(groups = "slow")
  public void testOrdering() throws Exception {
    Assert.assertTrue(basePath.mkdir());

    final List<String> filePathsCreated = new ArrayList<String>();
    final List<File> filesCreated = new ArrayList<File>();
    final int expected = 50;

    for (int i = 0; i < expected; i++) {
      filePathsCreated.add(outputStream.getFileName());
      Thread.sleep(17);
    }

    // Create the files in the opposite ordering to make sure we can re-read them in order
    for (int i = expected - 1; i >= 0; i--) {
      final File file = new File(filePathsCreated.get(i));
      Assert.assertTrue(file.createNewFile());
      filesCreated.add(file);
    }

    final MockReplayer replayer = new MockReplayer(basePath.toString(), Lists.reverse(filesCreated));
    replayer.readAll();

    Assert.assertEquals(replayer.getSeen(), expected);
  }
}
com.ning.billing.meter.timeline.persistentStreamyBytesPersistentOutputStreamgetFileName

Popular methods of StreamyBytesPersistentOutputStream

  • <init>
  • close
  • flushToFile
  • flushUnderlyingBufferAndReset
  • getBytesInMemory
  • getBytesOnDisk
  • getCreatedFiles
  • getInMemoryAvailableSpace
  • isEmpty
  • reset
  • write
  • write

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • JLabel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now