All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vmlens.trace.agent.bootstrap.event.StreamWrapperWithoutSlidingWindow Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package com.vmlens.trace.agent.bootstrap.event;


import java.io.BufferedOutputStream;
import java.io.DataOutputStream;
import java.io.FileOutputStream;

import gnu.trove.list.linked.TLinkedList;

public class StreamWrapperWithoutSlidingWindow  extends AbstractStreamWrapper  {
	
	

	
	protected DataOutputStream stream;
	protected final String eventDir;
	protected final String name;
	protected final int writerNumber;
	
	
	public DataOutputStream getStream() throws Exception
	{
		if( stream == null)
		{
			stream =  new DataOutputStream(new BufferedOutputStream(new FileOutputStream(eventDir + "/" +  name + "_" +writerNumber + ".vmlens" )));
			
			//streamStatistic  =  new DataOutputStream(new  BufferedOutputStream(new FileOutputStream(eventDir + "/" +  name + "Statistic_" +writerNumber + ".vmlens" )));
		}
		
		return stream;
	}
	
	

	public void close() throws Exception
	{
		if( stream != null)
		{
			 stream.close();
			
			// streamStatistic.close();
		}
	}


	
	public void flush()
	{
		
	}
	







	public StreamWrapperWithoutSlidingWindow(
			String eventDir, String name, int writerNumber,TLinkedList list) {
		super(list);
		
		this.eventDir = eventDir;
		this.name = name;
		this.writerNumber = writerNumber;
	}



	
	
	
	
	


	
	
	
	
	

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy