Enhancement #2196
Enhancement #2195: Implement Spread connection pooling
Spread connection pooling for informers [Java]
Status: | Resolved | Start date: | 03/11/2015 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | Java | |||
Target version: | rsb-0.12 |
Associated revisions
Extract spread connection options into SpreadOptions
Creates a new class SpreadOptions which contains all options used to
specify the properties of a connection to the spread daemon and uses
this class instead of separate arguments or Properties instances.
This prepares to use the connection properties as keys in maps for later
sharing of connections.
refs #2196
Make SpreadWrapper an interface
Makes SpreadWrapper and interface and moves the existing implementation
to SpreadWrapperImpl. This allows to implement facade classes, which is
necessary for the connection pooling.
- SpreadFactory: Use SpreadWrapperImpl instead of interface for new
instances - SpreadInPushConnector: Pass through some exceptions specified by the
Activatable interface which previously had been
explicitly masked by SpreadWrapperImpl - SpreadOutConnector: likewise
- SpreadWrapper: Converted to interface
- SpreadWrapperImpl: old SpreadWrapper implementation. Also removed some
unused methods. - Utilities: Use SpreadWrapperImpl
refs #2196
Implement connection pooling for outgoing connections
This commit adds spread connection pooling for outgoing connection by
reusing existing connections inside SpreadFactory. The effective
activation and deactivation of the underlying connection is now
implemented via reference counting of activate and deactivate calls so
that the first user of a connection activates it and the last leaving
user effectively deactivates it.
- RefCountingSpreadWrapper: new SpreadWrapper facade implementation
which does the reference counting for
multiple users of an underlying
SpreadWrapper instance. - SpreadFactory: Cache SpreadWrapper instances based on their
SpreadOptions to reuse them for outgoing connections - SpreadOutConnector: Decouple the activation state from the underlying
SpreadWrapper instance since the reference
counting might actually leave a connection open
after a call to deactivate
refs #2196
Extract spread connection options into SpreadOptions
Creates a new class SpreadOptions which contains all options used to
specify the properties of a connection to the spread daemon and uses
this class instead of separate arguments or Properties instances.
This prepares to use the connection properties as keys in maps for later
sharing of connections.
refs #2196
Make SpreadWrapper an interface
Makes SpreadWrapper and interface and moves the existing implementation
to SpreadWrapperImpl. This allows to implement facade classes, which is
necessary for the connection pooling.
- SpreadFactory: Use SpreadWrapperImpl instead of interface for new
instances - SpreadInPushConnector: Pass through some exceptions specified by the
Activatable interface which previously had been
explicitly masked by SpreadWrapperImpl - SpreadOutConnector: likewise
- SpreadWrapper: Converted to interface
- SpreadWrapperImpl: old SpreadWrapper implementation. Also removed some
unused methods. - Utilities: Use SpreadWrapperImpl
refs #2196
Implement connection pooling for outgoing connections
This commit adds spread connection pooling for outgoing connection by
reusing existing connections inside SpreadFactory. The effective
activation and deactivation of the underlying connection is now
implemented via reference counting of activate and deactivate calls so
that the first user of a connection activates it and the last leaving
user effectively deactivates it.
- RefCountingSpreadWrapper: new SpreadWrapper facade implementation
which does the reference counting for
multiple users of an underlying
SpreadWrapper instance. - SpreadFactory: Cache SpreadWrapper instances based on their
SpreadOptions to reuse them for outgoing connections - SpreadOutConnector: Decouple the activation state from the underlying
SpreadWrapper instance since the reference
counting might actually leave a connection open
after a call to deactivate
refs #2196
Use the same connection for all SpreadOutConnectors
refs #2196
History
#1 Updated by J. Wienke about 8 years ago
- % Done changed from 0 to 30
Connection pooling for informers is implemented in this branch now.
#2 Updated by J. Wienke almost 8 years ago
- Subject changed from Implement java spread connection pooling to Implement java spread connection pooling for informers
#3 Updated by J. Wienke almost 8 years ago
- % Done changed from 30 to 90
#4 Updated by J. Wienke almost 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
#5 Updated by J. Moringen almost 7 years ago
- Subject changed from Implement java spread connection pooling for informers to Spread connection pooling for informers [Java]