forked from hyperledger-labs/fabric-token-sdk
-
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.
Added parallel finality listener manager (hyperledger-labs#713)
Added parallel finality listener manager Signed-off-by: Alexandros Filios <alexandros.filios@ibm.com>
- Loading branch information
1 parent
32e8ba0
commit 6ec3e99
Showing
4 changed files
with
45 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright IBM Corp. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package common | ||
|
||
import ( | ||
"github.com/hyperledger-labs/fabric-smart-client/platform/common/driver" | ||
) | ||
|
||
type parallelListenerManagerProvider[V comparable] struct { | ||
provider driver.ListenerManagerProvider[V] | ||
} | ||
|
||
func NewParallelListenerManagerProvider[V comparable](provider driver.ListenerManagerProvider[V]) *parallelListenerManagerProvider[V] { | ||
return ¶llelListenerManagerProvider[V]{provider: provider} | ||
} | ||
|
||
func (p *parallelListenerManagerProvider[V]) NewManager() driver.ListenerManager[V] { | ||
return ¶llelListenerManager[V]{ListenerManager: p.provider.NewManager()} | ||
} | ||
|
||
type parallelListenerManager[V comparable] struct { | ||
driver.ListenerManager[V] | ||
} | ||
|
||
func (m *parallelListenerManager[V]) InvokeListeners(event driver.FinalityEvent[V]) { | ||
m.ListenerManager.InvokeListeners(event) | ||
} |