forked from fabric8io/docker-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes fabric8io#652.
- Loading branch information
Showing
9 changed files
with
274 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
src/main/java/io/fabric8/maven/docker/log/LogCallbackFactory.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/io/fabric8/maven/docker/log/SharedPrintStream.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.fabric8.maven.docker.log; | ||
|
||
import java.io.PrintStream; | ||
|
||
class SharedPrintStream { | ||
private PrintStream printStream; | ||
|
||
private int numUsers; | ||
|
||
public SharedPrintStream(PrintStream ps) { | ||
this.printStream = ps; | ||
this.numUsers = 1; | ||
} | ||
|
||
public PrintStream getPrintStream() { | ||
return printStream; | ||
} | ||
|
||
public void setPrintStream(PrintStream printStream) { | ||
this.printStream = printStream; | ||
} | ||
|
||
public boolean isUsed() { | ||
return numUsers > 0; | ||
} | ||
|
||
public void allocate() { | ||
numUsers++; | ||
} | ||
|
||
public void free() { | ||
assert numUsers > 0; | ||
numUsers--; | ||
} | ||
} |
Oops, something went wrong.