Java Examples for org.gradle.process.internal.health.memory.MemoryManager
The following java examples will help you to understand the usage of org.gradle.process.internal.health.memory.MemoryManager. These source code samples are taken from different open source projects.
Example 1
| Project: gradle-master File: SystemApplicationClassLoaderWorker.java View source code |
private void configureWorkerJvmMemoryInfoEvents(WorkerServices services, ObjectConnection connection) {
connection.useParameterSerializers(WorkerJvmMemoryInfoSerializer.create());
final WorkerJvmMemoryInfoProtocol workerJvmMemoryInfoProtocol = connection.addOutgoing(WorkerJvmMemoryInfoProtocol.class);
services.get(MemoryManager.class).addListener(new JvmMemoryStatusListener() {
@Override
public void onJvmMemoryStatus(JvmMemoryStatus jvmMemoryStatus) {
workerJvmMemoryInfoProtocol.sendJvmMemoryStatus(jvmMemoryStatus);
}
});
}