Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tracingplane-java
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cld
tracing
tracingplane-java
Commits
db6c0903
Commit
db6c0903
authored
May 10, 2017
by
Jonathan Mace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'isValid' method
parent
26e85615
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
baggagecontext/api/src/main/java/brown/tracingplane/BaggageProvider.java
...api/src/main/java/brown/tracingplane/BaggageProvider.java
+6
-0
baggagecontext/noop-impl/src/main/java/brown/tracingplane/noopprovider/NoOpBaggageContextProvider.java
...tracingplane/noopprovider/NoOpBaggageContextProvider.java
+5
-0
No files found.
baggagecontext/api/src/main/java/brown/tracingplane/BaggageProvider.java
View file @
db6c0903
...
...
@@ -10,6 +10,12 @@ import java.nio.ByteBuffer;
*/
public
interface
BaggageProvider
<
B
extends
BaggageContext
>
{
/**
* @param baggage a BaggageContext to test
* @return true if <code>baggage</code> is an instance of {@link B} or if baggage is null.
*/
boolean
isValid
(
BaggageContext
baggage
);
/**
* @return a new instance of {@link B}, which may be null to indicate an empty baggage
*/
...
...
baggagecontext/noop-impl/src/main/java/brown/tracingplane/noopprovider/NoOpBaggageContextProvider.java
View file @
db6c0903
...
...
@@ -9,6 +9,11 @@ import brown.tracingplane.BaggageProvider;
*/
public
class
NoOpBaggageContextProvider
implements
BaggageProvider
<
BaggageContext
>
{
@Override
public
boolean
isValid
(
BaggageContext
baggage
)
{
return
baggage
==
null
;
}
@Override
public
BaggageContext
newInstance
()
{
return
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment