Skip to content

Commit 231214e

Browse files
committed
Minor Queue change
(merge main -> ce/main 107731) [git-p4: depot-paths = "//dev/coherence-ce/main/": change = 107733]
1 parent c716fba commit 231214e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

prj/coherence-core/src/main/java/com/tangosol/internal/net/queue/NamedCacheBlockingDeque.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,34 @@ public NamedCacheBlockingDeque(String sName, NamedCache<QueueKey, E> cache)
4747
cache.addMapListener(this, AlwaysFilter.INSTANCE(), true);
4848
}
4949

50+
// ----- factory methods ------------------------------------------------
51+
52+
/**
53+
* Create a {@link Builder} option.
54+
* <p>
55+
* The {@link Builder} can be passed as an option to the
56+
* {@link Session#getDeque(String, Option...)} method to return
57+
* a {@link NamedBlockingDeque} instead of a {@link NamedDeque}.
58+
*/
59+
public Builder builder()
60+
{
61+
return builder("");
62+
}
63+
64+
/**
65+
* Create a {@link Builder} option.
66+
* <p>
67+
* The {@link Builder} can be passed as an option to the
68+
* {@link Session#getDeque(String, Option...)} method to return
69+
* a {@link NamedBlockingDeque} instead of a {@link NamedDeque}.
70+
*
71+
* @param sNamePrefix the prefix to add to queue cache names
72+
*/
73+
public Builder builder(String sNamePrefix)
74+
{
75+
return new Builder(sNamePrefix);
76+
}
77+
5078
// ----- BlockingDeque methods ------------------------------------------
5179

5280
@Override
@@ -378,6 +406,13 @@ public <E> NamedCacheDeque<E> build(String sName, NamedCache<QueueKey, E> cache)
378406
return new SessionNamedBlockingDeque<>(session, blockingDeque, loader, typeAssertion);
379407
}
380408

409+
// -----constants -------------------------------------------------------
410+
411+
/**
412+
* The singleton instance of the default {@link Builder}.
413+
*/
414+
public static Builder DEFAULT = new Builder("");
415+
381416
// ----- data members ---------------------------------------------------
382417

383418
/**

0 commit comments

Comments
 (0)