1 21 22 package org.apache.derby.impl.services.daemon; 23 24 import org.apache.derby.iapi.services.daemon.Serviceable; 25 26 27 class ServiceRecord 28 { 29 final Serviceable client; 31 private final boolean onDemandOnly; 32 final boolean subscriber; 33 34 private boolean serviceRequest; 36 37 ServiceRecord(Serviceable client, boolean onDemandOnly, boolean subscriber) 38 { 39 this.client = client; 40 this.onDemandOnly = onDemandOnly; 41 this.subscriber = subscriber; 42 } 43 44 final void serviced() 45 { 46 serviceRequest = false; 47 } 48 49 final boolean needImmediateService() 50 { 51 return serviceRequest; 52 } 53 54 final boolean needService() 55 { 56 return serviceRequest || !onDemandOnly; 57 } 58 59 60 final void called() 61 { 62 serviceRequest = true; 63 } 64 } 65 66 67 68 | Popular Tags |