├── .asf.yaml ├── .gitattributes ├── .github ├── GH-ROBOTS.txt ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── codeql-analysis.yml │ ├── dependency-review.yml │ ├── maven.yml │ └── scorecards-analysis.yml ├── .gitignore ├── BUILDING.txt ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── NOTICE.txt ├── README.md ├── RELEASE-NOTES.txt ├── SECURITY.md ├── auxiliary-builds ├── javagroups │ ├── project.properties │ ├── project.xml │ └── src │ │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── commons │ │ │ └── jcs │ │ │ └── auxiliary │ │ │ └── javagroups │ │ │ ├── JavaGroupsCache.java │ │ │ ├── JavaGroupsCacheAttributes.java │ │ │ └── JavaGroupsCacheFactory.java │ │ └── test │ │ └── org │ │ └── apache │ │ └── commons │ │ └── jcs │ │ └── auxiliary │ │ └── javagroups │ │ ├── JavaGroupsCacheTest.ccf │ │ ├── JavaGroupsCacheTest.java │ │ ├── JavaGroupsCacheWithGetTest.ccf │ │ └── JavaGroupsCacheWithGetTest.java └── jdk14 │ ├── project.properties │ ├── project.xml │ └── src │ ├── java │ └── org │ │ └── apache │ │ └── commons │ │ └── jcs │ │ ├── auxiliary │ │ ├── javagroups │ │ │ ├── JavaGroupsCache.java │ │ │ ├── JavaGroupsCacheAttributes.java │ │ │ └── JavaGroupsCacheFactory.java │ │ └── lateral │ │ │ ├── LateralCacheFactory.java │ │ │ ├── LateralCacheManager.java │ │ │ └── javagroups │ │ │ ├── JGConnectionHolder.java │ │ │ ├── LateralCacheJGListener.java │ │ │ ├── LateralGroupCacheJGListener.java │ │ │ ├── LateralJGCacheFactory.java │ │ │ ├── LateralJGCacheManager.java │ │ │ ├── LateralJGReceiver.java │ │ │ ├── LateralJGReceiverConnection.java │ │ │ ├── LateralJGSender.java │ │ │ ├── LateralJGService.java │ │ │ ├── behavior │ │ │ ├── IJGConstants.java │ │ │ └── ILateralCacheJGListener.java │ │ │ └── utils │ │ │ ├── JGRpcOpener.java │ │ │ └── JGSocketOpener.java │ │ └── engine │ │ └── memory │ │ └── lru │ │ └── LHMLRUMemoryCache.java │ └── test-conf │ └── log4j.properties ├── checkstyle.xml ├── commons-jcs3-core ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── commons │ │ └── jcs3 │ │ ├── JCS.java │ │ ├── access │ │ ├── AbstractCacheAccess.java │ │ ├── CacheAccess.java │ │ ├── GroupCacheAccess.java │ │ ├── behavior │ │ │ ├── ICacheAccess.java │ │ │ ├── ICacheAccessManagement.java │ │ │ └── IGroupCacheAccess.java │ │ ├── exception │ │ │ ├── CacheException.java │ │ │ ├── ConfigurationException.java │ │ │ ├── InvalidArgumentException.java │ │ │ ├── InvalidGroupException.java │ │ │ ├── InvalidHandleException.java │ │ │ ├── ObjectExistsException.java │ │ │ └── ObjectNotFoundException.java │ │ └── package-info.java │ │ ├── admin │ │ ├── CacheElementInfo.java │ │ ├── CacheRegionInfo.java │ │ ├── CountingOnlyOutputStream.java │ │ ├── JCSAdmin.jsp │ │ ├── JCSAdminBean.java │ │ └── JCSJMXBean.java │ │ ├── auxiliary │ │ ├── AbstractAuxiliaryCache.java │ │ ├── AbstractAuxiliaryCacheAttributes.java │ │ ├── AbstractAuxiliaryCacheEventLogging.java │ │ ├── AbstractAuxiliaryCacheFactory.java │ │ ├── AbstractAuxiliaryCacheMonitor.java │ │ ├── AuxiliaryCache.java │ │ ├── AuxiliaryCacheAttributes.java │ │ ├── AuxiliaryCacheConfigurator.java │ │ ├── AuxiliaryCacheFactory.java │ │ ├── disk │ │ │ ├── AbstractDiskCache.java │ │ │ ├── AbstractDiskCacheAttributes.java │ │ │ ├── PurgatoryElement.java │ │ │ ├── behavior │ │ │ │ └── IDiskCacheAttributes.java │ │ │ ├── block │ │ │ │ ├── BlockDisk.java │ │ │ │ ├── BlockDiskCache.java │ │ │ │ ├── BlockDiskCacheAttributes.java │ │ │ │ ├── BlockDiskCacheFactory.java │ │ │ │ ├── BlockDiskElementDescriptor.java │ │ │ │ └── BlockDiskKeyStore.java │ │ │ ├── indexed │ │ │ │ ├── IndexedDisk.java │ │ │ │ ├── IndexedDiskCache.java │ │ │ │ ├── IndexedDiskCacheAttributes.java │ │ │ │ ├── IndexedDiskCacheFactory.java │ │ │ │ ├── IndexedDiskDumper.java │ │ │ │ └── IndexedDiskElementDescriptor.java │ │ │ ├── jdbc │ │ │ │ ├── JDBCConnection.java │ │ │ │ ├── JDBCDiskCache.java │ │ │ │ ├── JDBCDiskCacheAttributes.java │ │ │ │ ├── JDBCDiskCacheFactory.java │ │ │ │ ├── ShrinkerThread.java │ │ │ │ ├── TableState.java │ │ │ │ ├── dsfactory │ │ │ │ │ ├── DataSourceFactory.java │ │ │ │ │ ├── JndiDataSourceFactory.java │ │ │ │ │ └── SharedPoolDataSourceFactory.java │ │ │ │ ├── hsql │ │ │ │ │ └── HSQLDiskCacheFactory.java │ │ │ │ └── mysql │ │ │ │ │ ├── MySQLDiskCache.java │ │ │ │ │ ├── MySQLDiskCacheAttributes.java │ │ │ │ │ ├── MySQLDiskCacheFactory.java │ │ │ │ │ ├── MySQLTableOptimizer.java │ │ │ │ │ └── util │ │ │ │ │ └── ScheduleParser.java │ │ │ └── package-info.java │ │ ├── lateral │ │ │ ├── LateralCache.java │ │ │ ├── LateralCacheAttributes.java │ │ │ ├── LateralCacheMonitor.java │ │ │ ├── LateralCacheNoWait.java │ │ │ ├── LateralCacheNoWaitFacade.java │ │ │ ├── LateralCommand.java │ │ │ ├── LateralElementDescriptor.java │ │ │ ├── behavior │ │ │ │ ├── ILateralCacheAttributes.java │ │ │ │ └── ILateralCacheListener.java │ │ │ ├── package-info.java │ │ │ └── socket │ │ │ │ └── tcp │ │ │ │ ├── LateralTCPCacheFactory.java │ │ │ │ ├── LateralTCPDiscoveryListener.java │ │ │ │ ├── LateralTCPListener.java │ │ │ │ ├── LateralTCPSender.java │ │ │ │ ├── LateralTCPService.java │ │ │ │ ├── TCPLateralCacheAttributes.java │ │ │ │ └── behavior │ │ │ │ └── ITCPLateralCacheAttributes.java │ │ ├── package-info.java │ │ └── remote │ │ │ ├── AbstractRemoteAuxiliaryCache.java │ │ │ ├── AbstractRemoteCacheListener.java │ │ │ ├── AbstractRemoteCacheNoWaitFacade.java │ │ │ ├── CommonRemoteCacheAttributes.java │ │ │ ├── RemoteCache.java │ │ │ ├── RemoteCacheAttributes.java │ │ │ ├── RemoteCacheFactory.java │ │ │ ├── RemoteCacheListener.java │ │ │ ├── RemoteCacheManager.java │ │ │ ├── RemoteCacheMonitor.java │ │ │ ├── RemoteCacheNoWait.java │ │ │ ├── RemoteCacheNoWaitFacade.java │ │ │ ├── RemoteLocation.java │ │ │ ├── RemoteUtils.java │ │ │ ├── behavior │ │ │ ├── ICommonRemoteCacheAttributes.java │ │ │ ├── IRemoteCacheAttributes.java │ │ │ ├── IRemoteCacheClient.java │ │ │ ├── IRemoteCacheConstants.java │ │ │ ├── IRemoteCacheDispatcher.java │ │ │ └── IRemoteCacheListener.java │ │ │ ├── http │ │ │ ├── behavior │ │ │ │ └── IRemoteHttpCacheConstants.java │ │ │ ├── client │ │ │ │ ├── AbstractHttpClient.java │ │ │ │ ├── RemoteHttpCache.java │ │ │ │ ├── RemoteHttpCacheAttributes.java │ │ │ │ ├── RemoteHttpCacheClient.java │ │ │ │ ├── RemoteHttpCacheDispatcher.java │ │ │ │ ├── RemoteHttpCacheFactory.java │ │ │ │ ├── RemoteHttpCacheMonitor.java │ │ │ │ ├── RemoteHttpClientListener.java │ │ │ │ └── behavior │ │ │ │ │ └── IRemoteHttpCacheClient.java │ │ │ └── server │ │ │ │ ├── AbstractRemoteCacheService.java │ │ │ │ ├── RemoteHttpCacheServerAttributes.java │ │ │ │ ├── RemoteHttpCacheService.java │ │ │ │ └── RemoteHttpCacheServlet.java │ │ │ ├── package-info.java │ │ │ ├── server │ │ │ ├── RemoteCacheServer.java │ │ │ ├── RemoteCacheServerAttributes.java │ │ │ ├── RemoteCacheServerFactory.java │ │ │ ├── RemoteCacheStartupServlet.java │ │ │ ├── TimeoutConfigurableRMISocketFactory.java │ │ │ └── behavior │ │ │ │ ├── IRemoteCacheServer.java │ │ │ │ ├── IRemoteCacheServerAttributes.java │ │ │ │ └── RemoteType.java │ │ │ ├── util │ │ │ └── RemoteCacheRequestFactory.java │ │ │ └── value │ │ │ ├── RemoteCacheRequest.java │ │ │ ├── RemoteCacheResponse.java │ │ │ └── RemoteRequestType.java │ │ ├── engine │ │ ├── AbstractCacheEventQueue.java │ │ ├── CacheAdaptor.java │ │ ├── CacheElement.java │ │ ├── CacheElementSerialized.java │ │ ├── CacheEventQueue.java │ │ ├── CacheEventQueueFactory.java │ │ ├── CacheInfo.java │ │ ├── CacheListeners.java │ │ ├── CacheStatus.java │ │ ├── CacheWatchRepairable.java │ │ ├── CompositeCacheAttributes.java │ │ ├── ElementAttributes.java │ │ ├── PooledCacheEventQueue.java │ │ ├── ZombieCacheService.java │ │ ├── ZombieCacheServiceNonLocal.java │ │ ├── ZombieCacheWatch.java │ │ ├── behavior │ │ │ ├── ICache.java │ │ │ ├── ICacheElement.java │ │ │ ├── ICacheElementSerialized.java │ │ │ ├── ICacheEventQueue.java │ │ │ ├── ICacheListener.java │ │ │ ├── ICacheObserver.java │ │ │ ├── ICacheService.java │ │ │ ├── ICacheServiceAdmin.java │ │ │ ├── ICacheServiceNonLocal.java │ │ │ ├── ICacheType.java │ │ │ ├── ICompositeCacheAttributes.java │ │ │ ├── ICompositeCacheManager.java │ │ │ ├── IElementAttributes.java │ │ │ ├── IElementSerializer.java │ │ │ ├── IProvideScheduler.java │ │ │ ├── IRequireScheduler.java │ │ │ ├── IShutdownObservable.java │ │ │ ├── IShutdownObserver.java │ │ │ ├── IZombie.java │ │ │ └── package-info.java │ │ ├── control │ │ │ ├── CompositeCache.java │ │ │ ├── CompositeCacheConfigurator.java │ │ │ ├── CompositeCacheManager.java │ │ │ ├── event │ │ │ │ ├── ElementEvent.java │ │ │ │ ├── ElementEventQueue.java │ │ │ │ └── behavior │ │ │ │ │ ├── ElementEventType.java │ │ │ │ │ ├── IElementEvent.java │ │ │ │ │ ├── IElementEventHandler.java │ │ │ │ │ └── IElementEventQueue.java │ │ │ ├── group │ │ │ │ ├── GroupAttrName.java │ │ │ │ └── GroupId.java │ │ │ └── package-info.java │ │ ├── logging │ │ │ ├── CacheEvent.java │ │ │ ├── CacheEventLoggerDebugLogger.java │ │ │ └── behavior │ │ │ │ ├── ICacheEvent.java │ │ │ │ └── ICacheEventLogger.java │ │ ├── match │ │ │ ├── KeyMatcherPatternImpl.java │ │ │ └── behavior │ │ │ │ └── IKeyMatcher.java │ │ ├── memory │ │ │ ├── AbstractDoubleLinkedListMemoryCache.java │ │ │ ├── AbstractMemoryCache.java │ │ │ ├── behavior │ │ │ │ └── IMemoryCache.java │ │ │ ├── fifo │ │ │ │ └── FIFOMemoryCache.java │ │ │ ├── lru │ │ │ │ ├── LHMLRUMemoryCache.java │ │ │ │ ├── LRUMemoryCache.java │ │ │ │ └── package-info.java │ │ │ ├── mru │ │ │ │ ├── MRUMemoryCache.java │ │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── shrinking │ │ │ │ └── ShrinkerThread.java │ │ │ ├── soft │ │ │ │ ├── SoftReferenceMemoryCache.java │ │ │ │ └── package-info.java │ │ │ └── util │ │ │ │ ├── MemoryElementDescriptor.java │ │ │ │ └── SoftReferenceElementDescriptor.java │ │ ├── package-info.java │ │ └── stats │ │ │ ├── CacheStats.java │ │ │ ├── StatElement.java │ │ │ ├── Stats.java │ │ │ └── behavior │ │ │ ├── ICacheStats.java │ │ │ ├── IStatElement.java │ │ │ └── IStats.java │ │ ├── io │ │ └── ObjectInputStreamClassLoaderAware.java │ │ ├── log │ │ ├── Log.java │ │ ├── MessageFormatter.java │ │ └── SystemLogAdapter.java │ │ ├── package-info.java │ │ └── utils │ │ ├── access │ │ ├── AbstractJCSWorkerHelper.java │ │ ├── JCSWorker.java │ │ └── JCSWorkerHelper.java │ │ ├── config │ │ ├── OptionConverter.java │ │ ├── PropertySetter.java │ │ ├── PropertySetterException.java │ │ └── package-info.java │ │ ├── discovery │ │ ├── DiscoveredService.java │ │ ├── UDPDiscoveryAttributes.java │ │ ├── UDPDiscoveryManager.java │ │ ├── UDPDiscoveryMessage.java │ │ ├── UDPDiscoveryReceiver.java │ │ ├── UDPDiscoverySender.java │ │ ├── UDPDiscoveryService.java │ │ └── behavior │ │ │ └── IDiscoveryListener.java │ │ ├── net │ │ └── HostNameUtil.java │ │ ├── serialization │ │ ├── CompressingSerializer.java │ │ ├── EncryptingSerializer.java │ │ ├── SerializationConversionUtil.java │ │ └── StandardSerializer.java │ │ ├── servlet │ │ └── JCSServletContextListener.java │ │ ├── struct │ │ ├── AbstractLRUMap.java │ │ ├── DoubleLinkedList.java │ │ ├── DoubleLinkedListNode.java │ │ ├── LRUElementDescriptor.java │ │ └── LRUMap.java │ │ ├── threadpool │ │ ├── DaemonThreadFactory.java │ │ ├── PoolConfiguration.java │ │ └── ThreadPoolManager.java │ │ ├── timing │ │ └── ElapsedTimer.java │ │ └── zip │ │ └── CompressionUtil.java │ ├── site │ └── resources │ │ ├── profile.japicmp │ │ └── profile.noanimal │ └── test │ ├── conf │ ├── JCSAdminServlet.velocity.properties │ ├── LocalStrings.properties │ ├── cache.ccf │ ├── cache.policy │ ├── cache2.ccf │ ├── cache3.ccf │ ├── cacheB.ccf │ ├── cacheBDB.ccf │ ├── cacheD10A.ccf │ ├── cacheD10B.ccf │ ├── cacheID.ccf │ ├── cacheJG1.ccf │ ├── cacheJG2.ccf │ ├── cacheJG3.ccf │ ├── cacheLMD1.ccf │ ├── cacheNA.ccf │ ├── cacheNA2.ccf │ ├── cacheNA3.ccf │ ├── cacheNB.ccf │ ├── cacheRC.ccf │ ├── cacheRC1.ccf │ ├── cacheRC2.ccf │ ├── cacheRCN1.ccf │ ├── cacheRCN2.ccf │ ├── cacheRCSimple.ccf │ ├── cacheRC_CEL.ccf │ ├── cacheRHTTP.ccf │ ├── cacheTCP1.ccf │ ├── cacheTCP2.ccf │ ├── cacheTCP3.ccf │ ├── cacheTCP4.ccf │ ├── jcsutils.properties │ ├── je.properties │ ├── logger.properties │ ├── myjetty.xml │ ├── myjetty2.xml │ ├── remote.cache.ccf │ ├── remote.cache2.ccf │ ├── remote.cache3.ccf │ ├── remote.cacheCEL.ccf │ ├── remote.cacheCEL_CSF.ccf │ ├── remote.cacheRS1.ccf │ ├── remote.cacheRS2.ccf │ ├── remote.tomcat.xml │ └── tomcat.xml │ ├── java │ └── org │ │ └── apache │ │ └── commons │ │ └── jcs3 │ │ ├── ConcurrentRemovalLoadTest.java │ │ ├── JCSCacheElementRetrievalUnitTest.java │ │ ├── JCSConcurrentCacheAccessUnitTest.java │ │ ├── JCSLightLoadUnitTest.java │ │ ├── JCSRemovalSimpleConcurrentTest.java │ │ ├── JCSThrashTest.java │ │ ├── JCSUnitTest.java │ │ ├── JCSvsHashtablePerformanceTest.java │ │ ├── RemovalTestUtil.java │ │ ├── TestLogConfigurationUtil.java │ │ ├── TestTCPLateralCache.java │ │ ├── ZeroSizeCacheUnitTest.java │ │ ├── access │ │ ├── CacheAccessUnitTest.java │ │ ├── GroupCacheAccessUnitTest.java │ │ ├── SystemPropertyUnitTest.java │ │ └── TestCacheAccess.java │ │ ├── admin │ │ ├── AdminBeanUnitTest.java │ │ ├── CountingStreamUnitTest.java │ │ └── TestJMX.java │ │ ├── auxiliary │ │ ├── AuxiliaryCacheConfiguratorUnitTest.java │ │ ├── MockAuxiliaryCache.java │ │ ├── MockAuxiliaryCacheAttributes.java │ │ ├── MockAuxiliaryCacheFactory.java │ │ ├── MockCacheEventLogger.java │ │ ├── disk │ │ │ ├── AbstractDiskCacheUnitTest.java │ │ │ ├── DiskTestObject.java │ │ │ ├── PurgatoryElementUnitTest.java │ │ │ ├── block │ │ │ │ ├── AbstractBlockDiskCacheUnitTest.java │ │ │ │ ├── BlockDiskCacheConcurrentUnitTest.java │ │ │ │ ├── BlockDiskCacheCountUnitTest.java │ │ │ │ ├── BlockDiskCacheKeyStoreUnitTest.java │ │ │ │ ├── BlockDiskCacheRandomConcurrentTestUtil.java │ │ │ │ ├── BlockDiskCacheSameRegionConcurrentUnitTest.java │ │ │ │ ├── BlockDiskCacheSizeUnitTest.java │ │ │ │ ├── BlockDiskCacheSteadyLoadTest.java │ │ │ │ ├── BlockDiskUnitTest.java │ │ │ │ └── HugeQuantityBlockDiskCacheLoadTest.java │ │ │ ├── indexed │ │ │ │ ├── AbstractIndexDiskCacheUnitTest.java │ │ │ │ ├── DiskTestObjectUtil.java │ │ │ │ ├── HugeQuantityIndDiskCacheLoadTest.java │ │ │ │ ├── IndexDiskCacheCountUnitTest.java │ │ │ │ ├── IndexDiskCacheSizeUnitTest.java │ │ │ │ ├── IndexedDiskCacheConcurrentNoDeadLockUnitTest.java │ │ │ │ ├── IndexedDiskCacheConcurrentUnitTest.java │ │ │ │ ├── IndexedDiskCacheDefragPerformanceTest.java │ │ │ │ ├── IndexedDiskCacheKeyStoreUnitTest.java │ │ │ │ ├── IndexedDiskCacheNoMemoryUnitTest.java │ │ │ │ ├── IndexedDiskCacheOptimizationUnitTest.java │ │ │ │ ├── IndexedDiskCacheRandomConcurrentTestUtil.java │ │ │ │ ├── IndexedDiskCacheSameRegionConcurrentUnitTest.java │ │ │ │ ├── IndexedDiskCacheSteadyLoadTest.java │ │ │ │ └── LRUMapSizeVsCount.java │ │ │ └── jdbc │ │ │ │ ├── HsqlSetupUtil.java │ │ │ │ ├── JDBCDataSourceFactoryUnitTest.java │ │ │ │ ├── JDBCDiskCacheRemovalUnitTest.java │ │ │ │ ├── JDBCDiskCacheSharedPoolUnitTest.java │ │ │ │ ├── JDBCDiskCacheShrinkUnitTest.java │ │ │ │ ├── JDBCDiskCacheUnitTest.java │ │ │ │ ├── hsql │ │ │ │ ├── HSQLDiskCacheConcurrentUnitTest.java │ │ │ │ └── HSQLDiskCacheUnitTest.java │ │ │ │ └── mysql │ │ │ │ ├── MySQLDiskCacheHsqlBackedUnitTest.java │ │ │ │ ├── MySQLDiskCacheUnitTest.java │ │ │ │ └── util │ │ │ │ └── ScheduleParserUtilUnitTest.java │ │ ├── lateral │ │ │ ├── LateralCacheNoWaitFacadeUnitTest.java │ │ │ └── socket │ │ │ │ └── tcp │ │ │ │ ├── LateralTCPConcurrentRandomTestUtil.java │ │ │ │ ├── LateralTCPDiscoveryListenerUnitTest.java │ │ │ │ ├── LateralTCPFilterRemoveHashCodeUnitTest.java │ │ │ │ ├── LateralTCPIssueRemoveOnPutUnitTest.java │ │ │ │ ├── LateralTCPNoDeadLockConcurrentTest.java │ │ │ │ └── TestTCPLateralUnitTest.java │ │ └── remote │ │ │ ├── MockRemoteCacheClient.java │ │ │ ├── MockRemoteCacheListener.java │ │ │ ├── MockRemoteCacheService.java │ │ │ ├── RemoteCacheClientTester.java │ │ │ ├── RemoteCacheListenerUnitTest.java │ │ │ ├── RemoteCacheNoWaitFacadeUnitTest.java │ │ │ ├── RemoteCacheNoWaitUnitTest.java │ │ │ ├── RemoteCacheUnitTest.java │ │ │ ├── RemoteUtilsUnitTest.java │ │ │ ├── TestRemoteCache.java │ │ │ ├── TestRemoteCacheFactory.java │ │ │ ├── ZombieRemoteCacheServiceUnitTest.java │ │ │ ├── http │ │ │ ├── client │ │ │ │ ├── MockRemoteCacheDispatcher.java │ │ │ │ ├── RemoteHttpCacheClientUnitTest.java │ │ │ │ ├── RemoteHttpCacheFactoryUnitTest.java │ │ │ │ └── RemoteHttpCacheManualTester.java │ │ │ └── server │ │ │ │ ├── RemoteHttpCacheServiceUnitTest.java │ │ │ │ └── RemoteHttpCacheServletUnitTest.java │ │ │ ├── server │ │ │ ├── BasicRemoteCacheClientServerUnitTest.java │ │ │ ├── MockRMISocketFactory.java │ │ │ ├── RemoteCacheServerAttributesUnitTest.java │ │ │ ├── RemoteCacheServerFactoryUnitTest.java │ │ │ ├── RemoteCacheServerStartupUtil.java │ │ │ ├── RemoteCacheServerUnitTest.java │ │ │ └── TimeoutConfigurableRMISocketFactoryUnitTest.java │ │ │ └── util │ │ │ └── RemoteCacheRequestFactoryUnitTest.java │ │ ├── engine │ │ ├── CacheEventQueueFactoryUnitTest.java │ │ ├── ElementAttributesUtils.java │ │ ├── EventQueueConcurrentLoadTest.java │ │ ├── MockCacheServiceNonLocal.java │ │ ├── SystemPropertyUsageUnitTest.java │ │ ├── ZombieCacheServiceNonLocalUnitTest.java │ │ ├── control │ │ │ ├── CacheManagerStatsUnitTest.java │ │ │ ├── CompositeCacheConfiguratorUnitTest.java │ │ │ ├── CompositeCacheDiskUsageUnitTest.java │ │ │ ├── CompositeCacheManagerTest.java │ │ │ ├── CompositeCacheUnitTest.java │ │ │ ├── MockCompositeCacheManager.java │ │ │ ├── MockElementSerializer.java │ │ │ └── event │ │ │ │ ├── ElementEventHandlerMockImpl.java │ │ │ │ └── SimpleEventHandlingUnitTest.java │ │ ├── logging │ │ │ ├── CacheEventLoggerDebugLoggerUnitTest.java │ │ │ └── MockCacheEventLogger.java │ │ ├── match │ │ │ └── KeyMatcherPatternImpllUnitTest.java │ │ └── memory │ │ │ ├── MockMemoryCache.java │ │ │ ├── fifo │ │ │ └── FIFOMemoryCacheUnitTest.java │ │ │ ├── lru │ │ │ ├── LHMLRUMemoryCacheConcurrentUnitTest.java │ │ │ ├── LHMLRUMemoryCacheUnitTest.java │ │ │ └── LRUMemoryCacheConcurrentUnitTest.java │ │ │ ├── mru │ │ │ ├── LRUvsMRUPerformanceTest.java │ │ │ └── MRUMemoryCacheUnitTest.java │ │ │ ├── shrinking │ │ │ └── ShrinkerThreadUnitTest.java │ │ │ └── soft │ │ │ └── SoftReferenceMemoryCacheUnitTest.java │ │ ├── log │ │ └── LogManagerUnitTest.java │ │ └── utils │ │ ├── access │ │ └── JCSWorkerUnitTest.java │ │ ├── config │ │ └── PropertySetterUnitTest.java │ │ ├── discovery │ │ ├── MockDiscoveryListener.java │ │ ├── UDPDiscoverySenderEncryptedUnitTest.java │ │ ├── UDPDiscoverySenderUnitTest.java │ │ ├── UDPDiscoveryServiceUnitTest.java │ │ └── UDPDiscoveryUnitTest.java │ │ ├── net │ │ └── HostNameUtilUnitTest.java │ │ ├── props │ │ └── PropertyLoader.java │ │ ├── serialization │ │ ├── CompressingSerializerUnitTest.java │ │ ├── EncryptingSerializerUnitTest.java │ │ ├── SerializationConversionUtilUnitTest.java │ │ ├── SerializerUnitTest.java │ │ └── StandardSerializerUnitTest.java │ │ ├── struct │ │ ├── DoubleLinkedListDumpUnitTest.java │ │ ├── DoubleLinkedListUnitTest.java │ │ ├── JCSvsCommonsLRUMapPerformanceTest.java │ │ ├── LRUMapConcurrentUnitTest.java │ │ ├── LRUMapPerformanceTest.java │ │ └── LRUMapUnitTest.java │ │ ├── threadpool │ │ └── ThreadPoolManagerUnitTest.java │ │ ├── timing │ │ └── SleepUtil.java │ │ └── zip │ │ └── CompressionUtilUnitTest.java │ └── test-conf │ ├── TestARCCache.ccf │ ├── TestBDBJEDiskCacheCon.ccf │ ├── TestBlockDiskCache.ccf │ ├── TestBlockDiskCacheCon.ccf │ ├── TestBlockDiskCacheHuge.ccf │ ├── TestBlockDiskCacheSteadyLoad.ccf │ ├── TestDiskCache.ccf │ ├── TestDiskCacheCon.ccf │ ├── TestDiskCacheDefragPerformance.ccf │ ├── TestDiskCacheHuge.ccf │ ├── TestDiskCacheNoMemory.ccf │ ├── TestDiskCacheSteadyLoad.ccf │ ├── TestDiskCacheUsagePattern.ccf │ ├── TestElementSerializer.ccf │ ├── TestHSQLDiskCache.ccf │ ├── TestHSQLDiskCacheConcurrent.ccf │ ├── TestJCS-73.ccf │ ├── TestJCSvHashtablePerf.ccf │ ├── TestJDBCDiskCache.ccf │ ├── TestJDBCDiskCacheRemoval.ccf │ ├── TestJDBCDiskCacheSharedPool.ccf │ ├── TestJDBCDiskCacheShrink.ccf │ ├── TestJispDiskCache.ccf │ ├── TestLHMLRUCache.ccf │ ├── TestMRUCache.ccf │ ├── TestMySQLDiskCache.ccf │ ├── TestRemoteCacheClientServer.ccf │ ├── TestRemoteCacheEventLogging.ccf │ ├── TestRemoteCacheServer.ccf │ ├── TestRemoteClient.ccf │ ├── TestRemoteHttpCache.ccf │ ├── TestRemoteServer.ccf │ ├── TestRemoval.ccf │ ├── TestSimpleEventHandling.ccf │ ├── TestSimpleLoad.ccf │ ├── TestSoftReferenceCache.ccf │ ├── TestSystemProperties.ccf │ ├── TestSystemPropertyUsage.ccf │ ├── TestTCPLateralCache.ccf │ ├── TestTCPLateralCacheConcurrent.ccf │ ├── TestTCPLateralIssueRemoveCache.ccf │ ├── TestTCPLateralRemoveFilter.ccf │ ├── TestThrash.ccf │ ├── TestUDPDiscovery.ccf │ ├── TestZeroSizeCache.ccf │ ├── cache.ccf │ ├── cache2.ccf │ ├── logging.properties │ └── thread_pool.properties ├── commons-jcs3-dist ├── pom.xml └── src │ └── assembly │ ├── bin.xml │ └── src.xml ├── commons-jcs3-jcache-extras ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── commons │ │ │ └── jcs3 │ │ │ └── jcache │ │ │ └── extras │ │ │ ├── cdi │ │ │ ├── AnyLiteral.java │ │ │ ├── CacheManagerBean.java │ │ │ ├── CacheProviderBean.java │ │ │ ├── DefaultLiteral.java │ │ │ └── ExtraJCacheExtension.java │ │ │ ├── closeable │ │ │ └── Closeables.java │ │ │ ├── loader │ │ │ ├── CacheLoaderAdapter.java │ │ │ └── CompositeCacheLoader.java │ │ │ ├── web │ │ │ ├── InMemoryResponse.java │ │ │ └── JCacheFilter.java │ │ │ └── writer │ │ │ ├── AsyncCacheWriter.java │ │ │ ├── CacheWriterAdapter.java │ │ │ └── CompositeCacheWriter.java │ └── resources │ │ └── META-INF │ │ └── services │ │ └── javax.enterprise.inject.spi.Extension │ └── test │ ├── java │ └── org │ │ └── apache │ │ └── commons │ │ └── jcs3 │ │ └── jcache │ │ └── extras │ │ ├── InternalCacheExtension.java │ │ ├── cdi │ │ └── ExtraJCacheExtensionTest.java │ │ ├── loader │ │ ├── CacheLoaderAdapterTest.java │ │ └── CompositeCacheLoaderTest.java │ │ ├── web │ │ └── JCacheFilterTest.java │ │ └── writer │ │ ├── CacheWriterAdapterTest.java │ │ └── CompositeCacheWriterTest.java │ └── resources │ └── META-INF │ └── beans.xml ├── commons-jcs3-jcache-openjpa ├── .gitignore ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── commons │ │ │ └── jcs3 │ │ │ └── jcache │ │ │ └── openjpa │ │ │ ├── OpenJPAJCacheDataCache.java │ │ │ ├── OpenJPAJCacheDataCacheManager.java │ │ │ ├── OpenJPAJCacheDerivation.java │ │ │ └── OpenJPAJCacheQueryCache.java │ └── resources │ │ └── META-INF │ │ └── services │ │ └── org.apache.openjpa.lib.conf.ProductDerivation │ └── test │ └── java │ └── org │ └── apache │ └── commons │ └── jcs3 │ └── jcache │ └── openjpa │ └── OpenJPAJCacheDataCacheTest.java ├── commons-jcs3-jcache-tck ├── pom.xml ├── run-tck.sh └── src │ └── test │ ├── java │ └── org │ │ └── apache │ │ └── commons │ │ └── jcs3 │ │ └── jcache │ │ ├── EnsureCDIIsTestedWhenTCKsRunTest.java │ │ └── OWBBeanProvider.java │ └── resources │ ├── ExcludeList │ └── META-INF │ └── services │ └── javax.cache.annotation.BeanProvider ├── commons-jcs3-jcache ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── commons │ │ │ └── jcs3 │ │ │ └── jcache │ │ │ ├── Asserts.java │ │ │ ├── EvictionListener.java │ │ │ ├── ExpiryAwareCache.java │ │ │ ├── ImmutableIterable.java │ │ │ ├── ImmutableIterator.java │ │ │ ├── JCSCache.java │ │ │ ├── JCSCacheEntryEvent.java │ │ │ ├── JCSCachingManager.java │ │ │ ├── JCSCachingProvider.java │ │ │ ├── JCSConfiguration.java │ │ │ ├── JCSEntry.java │ │ │ ├── JCSListener.java │ │ │ ├── JCSMutableEntry.java │ │ │ ├── NoFilter.java │ │ │ ├── NoLoader.java │ │ │ ├── NoWriter.java │ │ │ ├── Statistics.java │ │ │ ├── TempStateCacheView.java │ │ │ ├── Times.java │ │ │ ├── cdi │ │ │ ├── CDIJCacheHelper.java │ │ │ ├── CacheInvocationContextImpl.java │ │ │ ├── CacheInvocationParameterImpl.java │ │ │ ├── CacheKeyGeneratorImpl.java │ │ │ ├── CacheKeyInvocationContextImpl.java │ │ │ ├── CacheMethodDetailsImpl.java │ │ │ ├── CachePutInterceptor.java │ │ │ ├── CacheRemoveAllInterceptor.java │ │ │ ├── CacheRemoveInterceptor.java │ │ │ ├── CacheResolverFactoryImpl.java │ │ │ ├── CacheResolverImpl.java │ │ │ ├── CacheResultInterceptor.java │ │ │ ├── GeneratedCacheKeyImpl.java │ │ │ └── MakeJCacheCDIInterceptorFriendly.java │ │ │ ├── jmx │ │ │ ├── ConfigurableMBeanServerIdBuilder.java │ │ │ ├── JCSCacheMXBean.java │ │ │ ├── JCSCacheStatisticsMXBean.java │ │ │ └── JMXs.java │ │ │ ├── lang │ │ │ ├── DefaultSubsitutor.java │ │ │ ├── Lang3Substitutor.java │ │ │ └── Subsitutor.java │ │ │ ├── proxy │ │ │ ├── ClassLoaderAwareCache.java │ │ │ └── ExceptionWrapperHandler.java │ │ │ ├── serialization │ │ │ └── Serializations.java │ │ │ └── thread │ │ │ └── DaemonThreadFactory.java │ └── resources │ │ └── META-INF │ │ └── services │ │ ├── javax.cache.spi.CachingProvider │ │ └── javax.enterprise.inject.spi.Extension │ └── test │ └── java │ └── org │ └── apache │ └── commons │ └── jcs3 │ └── jcache │ ├── CacheTest.java │ ├── CachingProviderTest.java │ ├── ExpiryListenerTest.java │ ├── ImmediateExpiryTest.java │ ├── NotSerializableTest.java │ └── cdi │ └── CDIJCacheHelperTest.java ├── commons-jcs3-sandbox ├── commons-jcs3-filecache │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── commons │ │ │ └── jcs │ │ │ └── auxiliary │ │ │ └── disk │ │ │ └── file │ │ │ ├── FileDiskCache.java │ │ │ ├── FileDiskCacheAttributes.java │ │ │ ├── FileDiskCacheFactory.java │ │ │ └── FileDiskCacheManager.java │ │ └── test │ │ └── java │ │ └── org │ │ └── apache │ │ └── commons │ │ └── jcs │ │ └── auxiliary │ │ └── disk │ │ └── file │ │ ├── FileDiskCacheFactoryUnitTest.java │ │ └── FileDiskCacheUnitTest.java ├── commons-jcs3-partitioned │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── apache │ │ └── commons │ │ └── jcs │ │ ├── access │ │ └── PartitionedCacheAccess.java │ │ └── utils │ │ └── props │ │ ├── AbstractPropertyContainer.java │ │ ├── PropertiesFactory.java │ │ └── PropertiesFactoryFileImpl.java ├── commons-jcs3-yajcache │ ├── README.txt │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── commons │ │ │ └── jcs │ │ │ └── yajcache │ │ │ ├── beans │ │ │ ├── CacheChangeEvent.java │ │ │ ├── CacheChangeSupport.java │ │ │ ├── CacheClearEvent.java │ │ │ ├── CachePutBeanCloneEvent.java │ │ │ ├── CachePutBeanCopyEvent.java │ │ │ ├── CachePutCopyEvent.java │ │ │ ├── CachePutEvent.java │ │ │ ├── CacheRemoveEvent.java │ │ │ ├── ICacheChangeHandler.java │ │ │ └── ICacheChangeListener.java │ │ │ ├── config │ │ │ ├── PerCacheConfig.java │ │ │ └── YajCacheConfig.java │ │ │ ├── core │ │ │ ├── CacheEntry.java │ │ │ ├── CacheManager.java │ │ │ ├── CacheType.java │ │ │ ├── ICache.java │ │ │ ├── ICacheSafe.java │ │ │ └── SafeCacheWrapper.java │ │ │ ├── file │ │ │ ├── CacheFileContent.java │ │ │ ├── CacheFileContentCorrupted.java │ │ │ ├── CacheFileContentType.java │ │ │ ├── CacheFileDAO.java │ │ │ └── CacheFileUtils.java │ │ │ ├── lang │ │ │ ├── annotation │ │ │ │ ├── CopyRightApache.java │ │ │ │ ├── CopyRightType.java │ │ │ │ ├── Immutable.java │ │ │ │ ├── Implements.java │ │ │ │ ├── JavaBean.java │ │ │ │ ├── NonNullable.java │ │ │ │ ├── TODO.java │ │ │ │ ├── TestOnly.java │ │ │ │ ├── ThreadSafety.java │ │ │ │ ├── ThreadSafetyType.java │ │ │ │ └── UnsupportedOperation.java │ │ │ └── ref │ │ │ │ ├── IKey.java │ │ │ │ ├── KeyedRefCollector.java │ │ │ │ ├── KeyedSoftReference.java │ │ │ │ └── KeyedWeakReference.java │ │ │ ├── soft │ │ │ ├── SoftRefCache.java │ │ │ └── SoftRefFileCache.java │ │ │ └── util │ │ │ ├── BeanUtils.java │ │ │ ├── ClassUtils.java │ │ │ ├── CollectionUtils.java │ │ │ ├── EqualsUtils.java │ │ │ ├── SerializeUtils.java │ │ │ └── concurrent │ │ │ └── locks │ │ │ ├── IKeyedReadWriteLock.java │ │ │ └── KeyedReadWriteLock.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── commons │ │ │ └── jcs │ │ │ └── yajcache │ │ │ ├── core │ │ │ ├── CacheManagerTest.java │ │ │ └── SafeCacheManagerTest.java │ │ │ ├── file │ │ │ ├── CacheFileDAOTest.java │ │ │ └── FileContentTypeTest.java │ │ │ ├── lang │ │ │ └── annotation │ │ │ │ └── CopyRightApacheTest.java │ │ │ ├── soft │ │ │ ├── SoftRefCacheTest.java │ │ │ └── SoftRefFileCacheSafeTest.java │ │ │ └── util │ │ │ ├── SerializeUtilsTest.java │ │ │ └── TestSerializable.java │ │ └── resources │ │ └── log4j2.xml └── pom.xml ├── init-git-svn.sh ├── jcache-fast.sh ├── maven-eclipse-codestyle.xml ├── pom.xml ├── src ├── changes │ ├── changes.xml │ └── release-notes.vm ├── experimental │ └── org │ │ └── apache │ │ └── commons │ │ └── jcs │ │ ├── auxiliary │ │ └── lateral │ │ │ ├── http │ │ │ ├── broadcast │ │ │ │ ├── LateralCacheMulticaster.java │ │ │ │ ├── LateralCacheThread.java │ │ │ │ └── LateralCacheUnicaster.java │ │ │ ├── remove │ │ │ │ ├── DeleteLateralCacheMulticaster.java │ │ │ │ └── DeleteLateralCacheUnicaster.java │ │ │ └── server │ │ │ │ ├── AbstractDeleteCacheServlet.java │ │ │ │ ├── DeleteCacheServlet.java │ │ │ │ └── LateralCacheServletReciever.java │ │ │ ├── socket │ │ │ └── udp │ │ │ │ ├── LateralCacheUDPListener.java │ │ │ │ ├── LateralGroupCacheUDPListener.java │ │ │ │ ├── LateralUDPReceiver.java │ │ │ │ ├── LateralUDPSender.java │ │ │ │ └── LateralUDPService.java │ │ │ └── xmlrpc │ │ │ ├── LateralCacheXMLRPCListener.java │ │ │ ├── LateralGroupCacheXMLRPCListener.java │ │ │ ├── LateralXMLRPCReceiver.java │ │ │ ├── LateralXMLRPCReceiverConnection.java │ │ │ ├── LateralXMLRPCSender.java │ │ │ ├── LateralXMLRPCService.java │ │ │ ├── behavior │ │ │ ├── ILateralCacheXMLRPCListener.java │ │ │ └── IXMLRPCConstants.java │ │ │ └── utils │ │ │ └── XMLRPCSocketOpener.java │ │ └── engine │ │ └── memory │ │ └── arc │ │ ├── ARCMemoryCache.java │ │ └── ARCMemoryCacheUnitTest.java ├── scripts │ ├── cpappend.bat │ ├── directory.bat │ ├── jgtest.bat │ ├── jgtest_send.bat │ ├── jgtest_send.sh │ ├── prep.bat │ ├── remoteCacheStats.bat │ ├── remoteCacheStats.sh │ ├── setCURDIR.bat │ ├── startJetty.bat │ ├── startRemoteCache.bat │ ├── startRemoteCache.sh │ ├── stopRemoteCache.bat │ ├── tester.bat │ ├── tester.sh │ └── zipcodes.txt └── site │ ├── resources │ ├── download_jcs.cgi │ └── profile.jacoco │ └── site.xml └── xdocs ├── BDBJEDiskCache.ccf ├── BasicJCSConfiguration.xml ├── BlockDiskCache.xml ├── CacheEventLogging.xml ├── ElementAttributes.xml ├── ElementEventHandling.xml ├── ElementSerializers.xml ├── IndexedDiskAuxCache.xml ├── IndexedDiskCacheProperties.xml ├── JCSPlugins.xml ├── JCSShortDescription.xml ├── JCSandJCACHE.xml ├── JCSvsEHCache.xml ├── JDBCDiskCache.xml ├── JDBCDiskCacheProperties.xml ├── LateralJavaGroupsAuxCache.xml ├── LateralTCPAuxCache.xml ├── LateralTCPProperties.xml ├── LateralUDPDiscovery.xml ├── LocalCacheConfig.xml ├── MySQLDiskCacheProperties.xml ├── ProjectHistory.xml ├── RegionProperties.xml ├── RemoteAuxCache.xml ├── RemoteCacheProperties.xml ├── RemoteHttpCacheProperties.xml ├── UpgradingFrom13.xml ├── UpgradingFrom2x.xml ├── UsingJCSBasicWeb.xml ├── download_jcs.xml ├── faq.fml ├── getting_started └── intro.xml ├── index.xml ├── issue-tracking.xml └── mail-lists.xml /.asf.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | github: 17 | description: "Apache Commons JCS" 18 | homepage: https://commons.apache.org/jcs/ 19 | 20 | notifications: 21 | commits: commits@commons.apache.org 22 | issues: issues@commons.apache.org 23 | pullrequests: issues@commons.apache.org 24 | jira_options: link label 25 | jobs: notifications@commons.apache.org 26 | issues_bot_dependabot: notifications@commons.apache.org 27 | pullrequests_bot_dependabot: notifications@commons.apache.org 28 | issues_bot_codecov-commenter: notifications@commons.apache.org 29 | pullrequests_bot_codecov-commenter: notifications@commons.apache.org 30 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | * text=auto 17 | -------------------------------------------------------------------------------- /.github/GH-ROBOTS.txt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Keeps on creating FUD PRs in test code 17 | # Does not follow Apache disclosure policies 18 | User-agent: JLLeitschuh/security-research 19 | Disallow: * 20 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | version: 2 17 | updates: 18 | - package-ecosystem: "maven" 19 | directory: "/" 20 | schedule: 21 | interval: "weekly" 22 | day: "friday" 23 | - package-ecosystem: "github-actions" 24 | directory: "/" 25 | schedule: 26 | interval: "weekly" 27 | day: "friday" 28 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Thanks for your contribution to [Apache Commons](https://commons.apache.org/)! Your help is appreciated! 21 | 22 | Before you push a pull request, review this list: 23 | 24 | - [ ] Read the [contribution guidelines](CONTRIBUTING.md) for this project. 25 | - [ ] Run a successful build using the default [Maven](https://maven.apache.org/) goal with `mvn`; that's `mvn` on the command line by itself. 26 | - [ ] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible but is a best-practice. 27 | - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. 28 | - [ ] Each commit in the pull request should have a meaningful subject line and body. Note that commits might be squashed by a maintainer on merge. 29 | -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | name: 'Dependency Review' 19 | on: [pull_request] 20 | 21 | permissions: 22 | contents: read 23 | 24 | jobs: 25 | dependency-review: 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: 'Checkout Repository' 29 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 30 | - name: 'Dependency Review PR' 31 | uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | *.iml 3 | .classpath 4 | .project 5 | .settings 6 | .java-version 7 | .idea/ 8 | -------------------------------------------------------------------------------- /BUILDING.txt: -------------------------------------------------------------------------------- 1 | Default build is using: 2 | 3 | mvn clean install 4 | 5 | Release build is using (to get distributions - ie src/bin assemblies - and force TCKs to pass): 6 | 7 | mvn clean install -Prelease 8 | 9 | Note: this only passes on Java 7 since TCKs have to run on it. 10 | 11 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 17 | The Apache code of conduct page is [https://www.apache.org/foundation/policies/conduct.html](https://www.apache.org/foundation/policies/conduct.html). 18 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | Apache Commons JCS 2 | Copyright 2001-2025 The Apache Software Foundation. 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (https://www.apache.org/). 6 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 17 | The Apache Commons security page is [https://commons.apache.org/security.html](https://commons.apache.org/security.html). 18 | -------------------------------------------------------------------------------- /auxiliary-builds/javagroups/project.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | maven.junit.fork = true 18 | -------------------------------------------------------------------------------- /auxiliary-builds/javagroups/src/test/org/apache/commons/jcs/auxiliary/javagroups/JavaGroupsCacheTest.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | jcs.default = JG 18 | jcs.default.elementattributes = org.apache.commons.jcs.engine.ElementAttributes 19 | jcs.default.elementattributes.IsEternal = true 20 | jcs.default.elementattributes.MaxLifeSeconds = 60 21 | jcs.default.elementattributes.IsSpool = true 22 | jcs.default.elementattributes.IsRemote = true 23 | jcs.default.elementattributes.IsLateral = true 24 | 25 | jcs.auxiliary.JG = org.apache.commons.jcs.auxiliary.javagroups.JavaGroupsCacheFactory 26 | jcs.auxiliary.JG.attributes = org.apache.commons.jcs.auxiliary.javagroups.JavaGroupsCacheAttributes 27 | jcs.auxiliary.JG.attributes.ChannelFactoryClassName = org.javagroups.JChannelFactory 28 | jcs.auxiliary.JG.attributes.ChannelProperties = UDP(mcast_addr=224.0.0.100;mcast_port=7501):PING:FD:STABLE:NAKACK:UNICAST:FRAG:FLUSH:GMS:VIEW_ENFORCER:QUEUE 29 | -------------------------------------------------------------------------------- /auxiliary-builds/javagroups/src/test/org/apache/commons/jcs/auxiliary/javagroups/JavaGroupsCacheWithGetTest.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | jcs.default = JG 18 | jcs.default.elementattributes = org.apache.commons.jcs.engine.ElementAttributes 19 | jcs.default.elementattributes.IsEternal = true 20 | jcs.default.elementattributes.MaxLifeSeconds = 60 21 | jcs.default.elementattributes.IsSpool = true 22 | jcs.default.elementattributes.IsRemote = true 23 | jcs.default.elementattributes.IsLateral = true 24 | 25 | jcs.auxiliary.JG = org.apache.commons.jcs.auxiliary.javagroups.JavaGroupsCacheFactory 26 | jcs.auxiliary.JG.attributes = org.apache.commons.jcs.auxiliary.javagroups.JavaGroupsCacheAttributes 27 | jcs.auxiliary.JG.attributes.ChannelFactoryClassName = org.javagroups.JChannelFactory 28 | jcs.auxiliary.JG.attributes.ChannelProperties = UDP(mcast_addr=224.0.0.100;mcast_port=7501):PING:FD:STABLE:NAKACK:UNICAST:FRAG:FLUSH:GMS:VIEW_ENFORCER:QUEUE 29 | jcs.auxiliary.JG.attributes.GetFromPeers = true 30 | -------------------------------------------------------------------------------- /auxiliary-builds/jdk14/project.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | maven.jar.override = on 18 | maven.junit.fork = true 19 | # maven.jar.jcs = ${basedir}/../../target/jcs-1.1.3-dev.jar 20 | -------------------------------------------------------------------------------- /auxiliary-builds/jdk14/src/java/org/apache/commons/jcs/auxiliary/lateral/javagroups/behavior/IJGConstants.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.auxiliary.lateral.javagroups.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | public interface IJGConstants 23 | { 24 | 25 | public static final String HANDLERNAME = "LATERAL_JG_CACHE"; 26 | 27 | public static final String DEFAULT_JG_GROUP_NAME = "JCS_CACHE"; 28 | 29 | public static final String RPC_JG_GROUP_NAME = "RPC_JCS_CACHE"; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /auxiliary-builds/jdk14/src/java/org/apache/commons/jcs/auxiliary/lateral/javagroups/behavior/ILateralCacheJGListener.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.auxiliary.lateral.javagroups.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.auxiliary.lateral.behavior.ILateralCacheListener; 23 | 24 | import java.io.IOException; 25 | import java.io.Serializable; 26 | 27 | /** 28 | * Listens for lateral cache event notification. 29 | */ 30 | public interface ILateralCacheJGListener 31 | extends ILateralCacheListener 32 | { 33 | 34 | /** Description of the Method */ 35 | public void init(); 36 | 37 | /** Tries to get a requested item from the cache. */ 38 | public Serializable handleGet( String cacheName, K key ) 39 | throws IOException; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/access/exception/ConfigurationException.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.access.exception; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** Thrown if there is some severe configuration problem that makes the cache nonfunctional. */ 23 | public class ConfigurationException 24 | extends CacheException 25 | { 26 | /** Don't change. */ 27 | private static final long serialVersionUID = 6881044536186097055L; 28 | 29 | /** Constructor for the ConfigurationException object */ 30 | public ConfigurationException() 31 | { 32 | } 33 | 34 | /** 35 | * Constructor for the ConfigurationException object. 36 | * 37 | * @param message 38 | */ 39 | public ConfigurationException( final String message ) 40 | { 41 | super( message ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/access/exception/InvalidArgumentException.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.access.exception; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * InvalidArgumentException is thrown if an argument is passed to the cache that is invalid. For 24 | * instance, null values passed to put result in this exception. 25 | */ 26 | public class InvalidArgumentException 27 | extends CacheException 28 | { 29 | /** Don't change. */ 30 | private static final long serialVersionUID = -6058373692208755562L; 31 | 32 | /** Constructor for the InvalidArgumentException object */ 33 | public InvalidArgumentException() 34 | { 35 | } 36 | 37 | /** 38 | * Constructor for the InvalidArgumentException object. 39 | * 40 | * @param message 41 | */ 42 | public InvalidArgumentException( final String message ) 43 | { 44 | super( message ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/access/exception/InvalidGroupException.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.access.exception; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * InvalidGroupException 24 | */ 25 | public class InvalidGroupException 26 | extends CacheException 27 | { 28 | /** Don't change. */ 29 | private static final long serialVersionUID = -5219807114008843480L; 30 | 31 | /** Constructor for the InvalidGroupException object */ 32 | public InvalidGroupException() 33 | { 34 | } 35 | 36 | /** 37 | * Constructor for the InvalidGroupException object 38 | * 39 | * @param message 40 | */ 41 | public InvalidGroupException( final String message ) 42 | { 43 | super( message ); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/access/exception/InvalidHandleException.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.access.exception; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * InvalidHandleException is not used. 24 | */ 25 | public class InvalidHandleException 26 | extends CacheException 27 | { 28 | /** Don't change. */ 29 | private static final long serialVersionUID = -5947822454839845924L; 30 | 31 | /** Constructor for the InvalidHandleException object */ 32 | public InvalidHandleException() 33 | { 34 | // nothing 35 | 36 | } 37 | 38 | /** 39 | * Constructor for the InvalidHandleException object. 40 | * 41 | * @param message 42 | */ 43 | public InvalidHandleException( final String message ) 44 | { 45 | super( message ); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/access/exception/ObjectNotFoundException.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.access.exception; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * ObjectNotFoundException 24 | *

25 | * TODO see if we can remove this. 26 | *

27 | * This is thrown from the composite cache if you as for the element attributes and the element does 28 | * not exist. 29 | */ 30 | public class ObjectNotFoundException 31 | extends CacheException 32 | { 33 | /** Don't change. */ 34 | private static final long serialVersionUID = 5684353421076546842L; 35 | 36 | /** Constructor for the ObjectNotFoundException object */ 37 | public ObjectNotFoundException() 38 | { 39 | } 40 | 41 | /** 42 | * Constructor for the ObjectNotFoundException object 43 | * @param message 44 | */ 45 | public ObjectNotFoundException( final String message ) 46 | { 47 | super( message ); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/access/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Contains classes for accessing the cache. 20 | *

21 | * The CacheAccess interface, which all classes in this package implement, provides all the methods a client should need to use a Cache. 22 | *

23 | */ 24 | package org.apache.commons.jcs3.access; 25 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheFactory.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.auxiliary; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * Base class for auxiliary cache factories. 24 | */ 25 | public abstract class AbstractAuxiliaryCacheFactory 26 | implements AuxiliaryCacheFactory 27 | { 28 | /** The auxiliary name. The composite cache manager keeps this in a map, keyed by name. */ 29 | private String name = this.getClass().getSimpleName(); 30 | 31 | /** 32 | * Gets the name attribute of the DiskCacheFactory object 33 | * 34 | * @return The name value 35 | */ 36 | @Override 37 | public String getName() 38 | { 39 | return this.name; 40 | } 41 | 42 | /** 43 | * Sets the name attribute of the DiskCacheFactory object 44 | * 45 | * @param name The new name value 46 | */ 47 | @Override 48 | public void setName( final String name ) 49 | { 50 | this.name = name; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * The primary disk auxiliary. 20 | *

21 | * Objects are serialized to a file on disk. This implementation uses memory keys and performs quite well. Recommended for most cases. 22 | *

23 | */ 24 | package org.apache.commons.jcs3.auxiliary.disk; 25 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/LateralCommand.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.auxiliary.lateral; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * Enumeration of the available lateral commands 24 | */ 25 | public enum LateralCommand 26 | { 27 | /** The command for updates */ 28 | UPDATE, 29 | 30 | /** The command for removes */ 31 | REMOVE, 32 | 33 | /** The command instructing us to remove all */ 34 | REMOVEALL, 35 | 36 | /** The command for disposing the cache. */ 37 | DISPOSE, 38 | 39 | /** Command to return an object. */ 40 | GET, 41 | 42 | /** Command to return an object. */ 43 | GET_MATCHING, 44 | 45 | /** Command to get all keys */ 46 | GET_KEYSET 47 | } 48 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/behavior/ILateralCacheListener.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.auxiliary.lateral.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs3.engine.behavior.ICacheListener; 23 | import org.apache.commons.jcs3.engine.behavior.ICompositeCacheManager; 24 | 25 | /** 26 | * Listens for lateral cache event notification. 27 | */ 28 | public interface ILateralCacheListener 29 | extends ICacheListener 30 | { 31 | /** 32 | * Dispose this listener 33 | */ 34 | void dispose(); 35 | 36 | /** 37 | * @return the cacheMgr. 38 | */ 39 | ICompositeCacheManager getCacheManager(); 40 | 41 | /** 42 | * Initialize this listener 43 | */ 44 | void init(); 45 | 46 | /** 47 | * @param cacheMgr 48 | * The cacheMgr to set. 49 | */ 50 | void setCacheManager( ICompositeCacheManager cacheMgr ); 51 | } 52 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Root package for the lateral cache family. 20 | *

21 | * Lateral caches broadcast puts and removals to other local caches. 22 | *

23 | */ 24 | package org.apache.commons.jcs3.auxiliary.lateral; 25 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Root package for auxiliary caches. 20 | */ 21 | package org.apache.commons.jcs3.auxiliary; 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/http/behavior/IRemoteHttpCacheConstants.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.auxiliary.remote.http.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** Constants used throughout the HTTP remote cache. */ 23 | public interface IRemoteHttpCacheConstants 24 | { 25 | /** The prefix for cache server config. */ 26 | String HTTP_CACHE_SERVER_PREFIX = "jcs.remotehttpcache"; 27 | 28 | /** All of the RemoteHttpCacheServiceAttributes can be configured this way. */ 29 | String HTTP_CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX = HTTP_CACHE_SERVER_PREFIX 30 | + ".serverattributes"; 31 | } 32 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Root package for the remote auxiliary cache. 20 | */ 21 | package org.apache.commons.jcs3.auxiliary.remote; 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/behavior/IRemoteCacheServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.commons.jcs3.auxiliary.remote.server.behavior; 21 | 22 | import org.apache.commons.jcs3.engine.behavior.ICacheObserver; 23 | import org.apache.commons.jcs3.engine.behavior.ICacheServiceAdmin; 24 | import org.apache.commons.jcs3.engine.behavior.ICacheServiceNonLocal; 25 | 26 | /** 27 | * Interface for managing Remote objects 28 | */ 29 | public interface IRemoteCacheServer 30 | extends ICacheServiceNonLocal, ICacheObserver, ICacheServiceAdmin 31 | { 32 | // empty 33 | } 34 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/behavior/RemoteType.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.auxiliary.remote.server.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * Enum to describe the mode of the remote cache 24 | */ 25 | public enum RemoteType 26 | { 27 | /** A remote cache is either a local cache or a cluster cache */ 28 | LOCAL, 29 | 30 | /** A remote cache is either a local cache or a cluster cache */ 31 | CLUSTER 32 | } 33 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/value/RemoteRequestType.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.auxiliary.remote.value; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * The different types of requests 24 | */ 25 | public enum RemoteRequestType 26 | { 27 | /** Alive check request type. */ 28 | ALIVE_CHECK, 29 | 30 | /** Gets request type. */ 31 | GET, 32 | 33 | /** Gets Multiple request type. */ 34 | GET_MULTIPLE, 35 | 36 | /** Gets Matching request type. */ 37 | GET_MATCHING, 38 | 39 | /** Update request type. */ 40 | UPDATE, 41 | 42 | /** Remove request type. */ 43 | REMOVE, 44 | 45 | /** Remove All request type. */ 46 | REMOVE_ALL, 47 | 48 | /** Gets keys request type. */ 49 | GET_KEYSET, 50 | 51 | /** Dispose request type. */ 52 | DISPOSE, 53 | } 54 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/CacheInfo.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.rmi.dgc.VMID; 23 | 24 | /** 25 | * This is a static variable holder for the distribution auxiliaries that need something like a vmid. 26 | */ 27 | public final class CacheInfo 28 | { 29 | /** 30 | * Used to identify a client, so we can run multiple clients off one host. 31 | * Need since there is no way to identify a client other than by host in 32 | * rmi. 33 | *

34 | * TODO: may have some trouble in failover mode if the cache keeps its old 35 | * id. We may need to reset this when moving into failover. 36 | */ 37 | private static final VMID vmid = new VMID(); 38 | 39 | /** By default this is the hash code of the VMID */ 40 | public static final long listenerId = vmid.hashCode(); 41 | 42 | /** Shouldn't be instantiated */ 43 | private CacheInfo() 44 | { 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/CacheStatus.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * Cache statuses 24 | *

25 | */ 26 | public enum CacheStatus 27 | { 28 | /** Cache alive status. */ 29 | ALIVE, 30 | 31 | /** Cache disposed status. */ 32 | DISPOSED, 33 | 34 | /** Cache in error. */ 35 | ERROR 36 | } 37 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheElementSerialized.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * This interface defines the behavior of the serialized element wrapper. 24 | *

25 | * The value is stored as a byte array. This should allow for a variety of serialization mechanisms. 26 | *

27 | *

28 | * This currently extends ICacheElement<K, V> for backward compatibility. 29 | *

30 | */ 31 | public interface ICacheElementSerialized 32 | extends ICacheElement 33 | { 34 | /** 35 | * Gets the value attribute of the ICacheElementSerialized object. This is the value the client 36 | * cached serialized by some mechanism. 37 | * 38 | * @return The serialized value 39 | */ 40 | byte[] getSerializedValue(); 41 | } 42 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheServiceAdmin.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.io.IOException; 23 | 24 | /** 25 | * Description of the Interface 26 | */ 27 | public interface ICacheServiceAdmin 28 | { 29 | 30 | /** 31 | * Gets the stats attribute of the ICacheServiceAdmin object 32 | * 33 | * @return The stats value 34 | * @throws IOException 35 | */ 36 | String getStats() 37 | throws IOException; 38 | 39 | /** Description of the Method 40 | * @throws IOException*/ 41 | void shutdown() 42 | throws IOException; 43 | 44 | /** Description of the Method 45 | * @param host 46 | * @param port 47 | * @throws IOException*/ 48 | void shutdown( String host, int port ) 49 | throws IOException; 50 | } 51 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheType.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * Interface implemented by a specific cache. 24 | */ 25 | public interface ICacheType 26 | { 27 | enum CacheType { 28 | /** Composite/ memory cache type, central hub. */ 29 | CACHE_HUB, 30 | 31 | /** Disk cache type. */ 32 | DISK_CACHE, 33 | 34 | /** Lateral cache type. */ 35 | LATERAL_CACHE, 36 | 37 | /** Remote cache type. */ 38 | REMOTE_CACHE 39 | } 40 | 41 | /** 42 | * Returns the cache type. 43 | * 44 | * @return The cacheType value 45 | */ 46 | CacheType getCacheType(); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/behavior/IProvideScheduler.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.util.concurrent.ScheduledExecutorService; 23 | 24 | /** 25 | * Marker interface for providers of the central ScheduledExecutorService 26 | */ 27 | public interface IProvideScheduler 28 | { 29 | /** 30 | * Gets an instance of a central ScheduledExecutorService 31 | * @return the central scheduler 32 | */ 33 | ScheduledExecutorService getScheduledExecutorService(); 34 | } 35 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/behavior/IRequireScheduler.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.util.concurrent.ScheduledExecutorService; 23 | 24 | /** 25 | * Marker interface to allow the injection of a central ScheduledExecutorService 26 | * for all modules requiring scheduled background operations. 27 | */ 28 | public interface IRequireScheduler 29 | { 30 | /** 31 | * Inject an instance of a central ScheduledExecutorService 32 | * @param scheduledExecutor 33 | */ 34 | void setScheduledExecutorService( ScheduledExecutorService scheduledExecutor ); 35 | } 36 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/behavior/IShutdownObserver.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * This interface is required of all shutdown observers. These observers 24 | * can observer ShutdownObservable objects. The CacheManager is the primary 25 | * observable that this is intended for. 26 | *

27 | * Most shutdown operations will occur outside this framework for now. The initial 28 | * goal is to allow background threads that are not reachable through any reference 29 | * that the cache manager maintains to be killed on shutdown. 30 | *

31 | */ 32 | public interface IShutdownObserver 33 | { 34 | /** 35 | * Tells the observer that the observable has received a shutdown command. 36 | */ 37 | void shutdown(); 38 | } 39 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/behavior/IZombie.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * Interface to mark an object as zombie for error recovery purposes. 24 | */ 25 | public interface IZombie 26 | { 27 | // Zombies have no inner life. 28 | // No qaulia found. 29 | } 30 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/behavior/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Interfaces used by the core and the auxiliary caches. 20 | */ 21 | package org.apache.commons.jcs3.engine.behavior; 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/control/event/behavior/IElementEvent.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.control.event.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.io.Serializable; 23 | 24 | /** 25 | * Defines how an element event object should behave. 26 | */ 27 | public interface IElementEvent 28 | extends Serializable 29 | { 30 | /** 31 | * Gets the elementEvent attribute of the IElementEvent object. This code is Contained in the 32 | * IElememtEventConstants class. 33 | * 34 | * @return The elementEvent value 35 | */ 36 | ElementEventType getElementEvent(); 37 | 38 | /** 39 | * @return the source of the event. 40 | */ 41 | T getSource(); 42 | } 43 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/control/event/behavior/IElementEventHandler.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.control.event.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * This interface defines the behavior for event handler. Event handlers are 24 | * transient. They are not replicated and are not written to disk. 25 | *

26 | * If you want an event handler by default for all elements in a region, then 27 | * you can add it to the default element attributes. This way it will get created 28 | * whenever an item gets put into the cache. 29 | */ 30 | public interface IElementEventHandler 31 | { 32 | /** 33 | * Handle events for this element. The events are typed. 34 | * 35 | * @param event 36 | * The event created by the cache. 37 | */ 38 | void handleElementEvent( IElementEvent event ); 39 | } 40 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/control/event/behavior/IElementEventQueue.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.control.event.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.io.IOException; 23 | 24 | /** 25 | * Interface for an element event queue. An event queue is used to propagate 26 | * ordered element events in one region. 27 | */ 28 | public interface IElementEventQueue 29 | { 30 | /** 31 | * Adds an ElementEvent to be handled 32 | * 33 | * @param hand 34 | * The IElementEventHandler 35 | * @param event 36 | * The IElementEventHandler IElementEvent event 37 | * @throws IOException 38 | */ 39 | void addElementEvent( IElementEventHandler hand, IElementEvent event ) 40 | throws IOException; 41 | 42 | /** 43 | * Destroy the event queue 44 | */ 45 | void dispose(); 46 | } 47 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/control/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * The primary cache classes and the hub. 20 | */ 21 | package org.apache.commons.jcs3.engine.control; 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/match/behavior/IKeyMatcher.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.match.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.io.Serializable; 23 | import java.util.Set; 24 | 25 | /** Key matchers need to implement this interface. */ 26 | public interface IKeyMatcher extends Serializable 27 | { 28 | /** 29 | * Creates a pattern and find matches on the array. 30 | * 31 | * @param pattern 32 | * @param keyArray 33 | * @return Set of the matching keys 34 | */ 35 | Set getMatchingKeysFromArray( String pattern, Set keyArray ); 36 | } 37 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/memory/lru/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * The primary memory plugin using a 'least recently used' removal policy. 20 | */ 21 | package org.apache.commons.jcs3.engine.memory.lru; 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/memory/mru/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * A memory plugin implemented using a 'most recently used' removal policy. 20 | *

21 | * In general this is slow and should not be used. 22 | *

23 | */ 24 | package org.apache.commons.jcs3.engine.memory.mru; 25 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/memory/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Parent package for memory type plugins. 20 | */ 21 | package org.apache.commons.jcs3.engine.memory; 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/memory/soft/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * A memory plugin implemented using soft references. 20 | */ 21 | package org.apache.commons.jcs3.engine.memory.soft; 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Interfaces used by the core and the auxiliary caches. 20 | */ 21 | package org.apache.commons.jcs3.engine; 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/stats/behavior/ICacheStats.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.stats.behavior; 2 | 3 | import java.util.List; 4 | 5 | /* 6 | * Licensed to the Apache Software Foundation (ASF) under one 7 | * or more contributor license agreements. See the NOTICE file 8 | * distributed with this work for additional information 9 | * regarding copyright ownership. The ASF licenses this file 10 | * to you under the Apache License, Version 2.0 (the 11 | * "License"); you may not use this file except in compliance 12 | * with the License. You may obtain a copy of the License at 13 | * 14 | * https://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, 17 | * software distributed under the License is distributed on an 18 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 19 | * KIND, either express or implied. See the License for the 20 | * specific language governing permissions and limitations 21 | * under the License. 22 | */ 23 | 24 | /** 25 | * This holds stat information on a region. It contains both auxiliary and core stats. 26 | */ 27 | public interface ICacheStats 28 | extends IStats 29 | { 30 | /** 31 | * @return IStats[] 32 | */ 33 | List getAuxiliaryCacheStats(); 34 | 35 | /** 36 | * Stats are for a region, though auxiliary data may be for more. 37 | * 38 | * @return The region name 39 | */ 40 | String getRegionName(); 41 | 42 | /** 43 | * @param stats 44 | */ 45 | void setAuxiliaryCacheStats( List stats ); 46 | 47 | /** 48 | * @param name 49 | */ 50 | void setRegionName( String name ); 51 | } 52 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/stats/behavior/IStatElement.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.engine.stats.behavior; 2 | 3 | import java.io.Serializable; 4 | 5 | /* 6 | * Licensed to the Apache Software Foundation (ASF) under one 7 | * or more contributor license agreements. See the NOTICE file 8 | * distributed with this work for additional information 9 | * regarding copyright ownership. The ASF licenses this file 10 | * to you under the Apache License, Version 2.0 (the 11 | * "License"); you may not use this file except in compliance 12 | * with the License. You may obtain a copy of the License at 13 | * 14 | * https://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, 17 | * software distributed under the License is distributed on an 18 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 19 | * KIND, either express or implied. See the License for the 20 | * specific language governing permissions and limitations 21 | * under the License. 22 | */ 23 | 24 | /** 25 | * IAuxiliaryCacheStats will hold these IStatElements. 26 | */ 27 | public interface IStatElement extends Serializable 28 | { 29 | /** 30 | * Gets the data, for example, for hit count you would get a value for some number. 31 | * 32 | * @return data 33 | */ 34 | V getData(); 35 | 36 | /** 37 | * Gets the name of the stat element, for example, HitCount 38 | * 39 | * @return the stat element name 40 | */ 41 | String getName(); 42 | 43 | /** 44 | * Sets the data for this element. 45 | * 46 | * @param data 47 | */ 48 | void setData( V data ); 49 | 50 | /** 51 | * @param name 52 | */ 53 | void setName( String name ); 54 | } 55 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Contains the class JCS which provides a simple interface for clients to use JCS. 20 | */ 21 | package org.apache.commons.jcs3; 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/utils/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * https://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * This package contains utility classes that are used when configuring the cache. 20 | *

21 | * NOTE: It is likely that these classes will be removed in the future in favor of commons-configuration. 22 | *

23 | */ 24 | package org.apache.commons.jcs3.utils.config; 25 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/utils/discovery/behavior/IDiscoveryListener.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.utils.discovery.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs3.utils.discovery.DiscoveredService; 23 | 24 | /** 25 | * Interface for things that want to listen to discovery events. This will allow discovery to be 26 | * used outside of the TCP lateral. 27 | */ 28 | public interface IDiscoveryListener 29 | { 30 | /** 31 | * Add the service if needed. This does not necessarily mean that the service is not already 32 | * added. This can be called if there is a change in service information, such as the cacheNames. 33 | * 34 | * @param service the service to add 35 | */ 36 | void addDiscoveredService( DiscoveredService service ); 37 | 38 | /** 39 | * Remove the service from the list. 40 | * 41 | * @param service the service to remove 42 | */ 43 | void removeDiscoveredService( DiscoveredService service ); 44 | } 45 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/main/java/org/apache/commons/jcs3/utils/struct/LRUMap.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.utils.struct; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * Simple LRUMap implementation that keeps the number of the objects below or equal maxObjects 24 | * 25 | * @param 26 | * @param 27 | */ 28 | public class LRUMap extends AbstractLRUMap 29 | { 30 | /** If the max is less than 0, there is no limit! */ 31 | private int maxObjects = -1; 32 | 33 | public LRUMap() 34 | { 35 | } 36 | 37 | /** 38 | * 39 | * @param maxObjects 40 | * maximum number to keep in the map 41 | */ 42 | public LRUMap(final int maxObjects) 43 | { 44 | this(); 45 | this.maxObjects = maxObjects; 46 | } 47 | 48 | @Override 49 | public boolean shouldRemove() 50 | { 51 | return maxObjects > 0 && size() > maxObjects; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/site/resources/profile.japicmp: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | Enable japicmp for core -------------------------------------------------------------------------------- /commons-jcs3-core/src/site/resources/profile.noanimal: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | Animal sniffer throws NPE -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/conf/JCSAdminServlet.velocity.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | runtime.log.logsystem.class = org.apache.velocity.runtime.log.AvalonLogSystem 18 | runtime.log.logsystem.log4j.category = org.apache.plexus.velocity.DefaultVelocityComponentTest 19 | 20 | resource.loader = classpath 21 | classpath.resource.loader.class = org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader 22 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/conf/cache.policy: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // https://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | grant { 19 | permission java.security.AllPermission; 20 | }; 21 | 22 | 23 | grant codeBase "file:g:/dev/jakarta-turbine-jcs/target/classes/*" { 24 | permission java.security.AllPermission; 25 | }; 26 | 27 | grant codeBase "file:g:/dev/jakarta-turbine-jcs/src/conf/*" { 28 | permission java.security.AllPermission; 29 | }; 30 | 31 | grant codeBase "file:g:/dev/jakarta-turbine-jcs/src/conf/scripts/*" { 32 | permission java.security.AllPermission; 33 | }; 34 | 35 | grant codeBase "file:g:/dev/jakarta-turbine-jcs/*" { 36 | permission java.security.AllPermission; 37 | }; 38 | 39 | grant codeBase "file:/G:/*" { 40 | permission java.security.AllPermission; 41 | }; 42 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/conf/jcsutils.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | admin.userid=admin 18 | admin.password=system 19 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/java/org/apache/commons/jcs3/admin/TestJMX.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.admin; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs3.JCS; 23 | import org.apache.commons.jcs3.access.CacheAccess; 24 | 25 | /** 26 | * Helper class to test the JMX registration 27 | */ 28 | public class TestJMX 29 | { 30 | public static void main(final String[] args) throws Exception 31 | { 32 | final CacheAccess cache = JCS.getInstance("test"); 33 | 34 | cache.put("key", "value"); 35 | System.out.println("Waiting..."); 36 | Thread.sleep(Long.MAX_VALUE); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCacheAttributes.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.auxiliary; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** For testing. */ 23 | public class MockAuxiliaryCacheAttributes 24 | extends AbstractAuxiliaryCacheAttributes 25 | { 26 | /** Don't change. */ 27 | private static final long serialVersionUID = 1091238902450504108L; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheCountUnitTest.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.auxiliary.disk.block; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs3.auxiliary.disk.behavior.IDiskCacheAttributes.DiskLimitType; 23 | 24 | public class BlockDiskCacheCountUnitTest extends AbstractBlockDiskCacheUnitTest 25 | { 26 | 27 | @Override 28 | public BlockDiskCacheAttributes getCacheAttributes() 29 | { 30 | final BlockDiskCacheAttributes ret = new BlockDiskCacheAttributes(); 31 | ret.setDiskLimitType(DiskLimitType.COUNT); 32 | return ret; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheSizeUnitTest.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.auxiliary.disk.block; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs3.auxiliary.disk.behavior.IDiskCacheAttributes.DiskLimitType; 23 | 24 | public class BlockDiskCacheSizeUnitTest extends AbstractBlockDiskCacheUnitTest 25 | { 26 | 27 | @Override 28 | public BlockDiskCacheAttributes getCacheAttributes() 29 | { 30 | final BlockDiskCacheAttributes ret = new BlockDiskCacheAttributes(); 31 | ret.setDiskLimitType(DiskLimitType.SIZE); 32 | return ret; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/java/org/apache/commons/jcs3/log/LogManagerUnitTest.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.log; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import static org.junit.jupiter.api.Assertions.assertNotNull; 23 | 24 | import org.junit.jupiter.api.Test; 25 | 26 | class LogManagerUnitTest 27 | { 28 | @Test 29 | void testLogFactoryDefault() 30 | { 31 | assertNotNull(Log.getLog(getClass())); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/java/org/apache/commons/jcs3/utils/net/HostNameUtilUnitTest.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.utils.net; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import static org.junit.jupiter.api.Assertions.assertNotNull; 23 | 24 | import java.net.UnknownHostException; 25 | 26 | import org.junit.jupiter.api.Test; 27 | 28 | /** Tests for the host name util. */ 29 | class HostNameUtilUnitTest 30 | { 31 | /** 32 | * It's nearly impossible to unit test the getLocalHostLANAddress method. 33 | * 34 | * @throws UnknownHostException 35 | */ 36 | @Test 37 | void testGetLocalHostAddress_Simple() 38 | throws UnknownHostException 39 | { 40 | // DO WORK 41 | final String result = HostNameUtil.getLocalHostAddress(); 42 | 43 | // VERIFY 44 | //System.out.print( result ); 45 | assertNotNull( result, "Should have a host address." ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestARCCache.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # JCS Config for unit testing, just a simple memory only cache, with 10 max size 18 | # with the memory shrinker on. 19 | 20 | jcs.default= 21 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 22 | jcs.default.cacheattributes.MaxObjects=10 23 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.arc.ARCMemoryCache 24 | jcs.default.cacheattributes.UseMemoryShrinker=false 25 | jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600 26 | jcs.default.cacheattributes.ShrinkerIntervalSeconds=1 27 | jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes 28 | jcs.default.elementattributes.IsEternal=true 29 | jcs.default.elementattributes.MaxLife=600 30 | jcs.default.elementattributes.IdleTime=1800 31 | jcs.default.elementattributes.IsSpool=true 32 | jcs.default.elementattributes.IsRemote=true 33 | jcs.default.elementattributes.IsLateral=true 34 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestBlockDiskCacheSteadyLoad.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # Java Caching System configuration file 18 | 19 | # DEFAULT CACHE REGION 20 | jcs.default=DC 21 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 22 | jcs.default.cacheattributes.MaxObjects=100 23 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 24 | jcs.default.cacheattributes.DiskUsagePatternName=UPDATE 25 | 26 | 27 | # AVAILABLE AUXILIARY CACHES 28 | jcs.auxiliary.DC=org.apache.commons.jcs3.auxiliary.disk.block.BlockDiskCacheFactory 29 | jcs.auxiliary.DC.attributes=org.apache.commons.jcs3.auxiliary.disk.block.BlockDiskCacheAttributes 30 | jcs.auxiliary.DC.attributes.DiskPath=target/test-sandbox/block-steady-load 31 | jcs.auxiliary.DC.attributes.maxKeySize=20000 32 | jcs.auxiliary.DC.attributes.blockSizeBytes=5000 33 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestDiskCacheDefragPerformance.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # Java Caching System configuration file 18 | 19 | # DEFAULT CACHE REGION 20 | jcs.default=DC 21 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 22 | jcs.default.cacheattributes.MaxObjects=100 23 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 24 | cs.default.cacheattributes.DiskUsagePatterName=UPDATE 25 | 26 | # AVAILABLE AUXILIARY CACHES 27 | jcs.auxiliary.DC=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory 28 | jcs.auxiliary.DC.attributes=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes 29 | jcs.auxiliary.DC.attributes.DiskPath=target/test-sandbox/defrag 30 | jcs.auxiliary.DC.attributes.maxKeySize=10000 31 | jcs.auxiliary.DC.attributes.MaxPurgatorySize=5000 32 | jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=5000 33 | 34 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestDiskCacheSteadyLoad.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # Java Caching System configuration file 18 | 19 | # DEFAULT CACHE REGION 20 | jcs.default=DC 21 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 22 | jcs.default.cacheattributes.MaxObjects=100 23 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 24 | jcs.default.cacheattributes.DiskUsagePatternName=UPDATE 25 | 26 | 27 | # AVAILABLE AUXILIARY CACHES 28 | jcs.auxiliary.DC=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory 29 | jcs.auxiliary.DC.attributes=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes 30 | jcs.auxiliary.DC.attributes.DiskPath=target/test-sandbox/steady-load 31 | jcs.auxiliary.DC.attributes.maxKeySize=1000 32 | jcs.auxiliary.DC.attributes.MaxPurgatorySize=1000 33 | jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=20000 34 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestLHMLRUCache.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # Cache configuration for the 'TestDiskCache' test. The memory cache has a 18 | # a maximum of 100 objects, so objects should get pushed into the disk cache 19 | 20 | jcs.default= 21 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 22 | jcs.default.cacheattributes.MaxObjects=100 23 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LHMLRUMemoryCache 24 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestRemoteCacheServer.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # ############################################################# 18 | # ################# DEFAULT CACHE REGION ##################### 19 | jcs.default= 20 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 21 | jcs.default.cacheattributes.MaxObjects=1000 22 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 23 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestSimpleLoad.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # JCS Config for unit testing, just a simple memory only cache 18 | 19 | jcs.default= 20 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 21 | jcs.default.cacheattributes.MaxObjects=1000 22 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 23 | 24 | jcs.region.testCache1= 25 | jcs.region.testCache1.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 26 | jcs.region.testCache1.cacheattributes.MaxObjects=20001 27 | jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 28 | 29 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestSystemPropertyUsage.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | jcs.default= 18 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 19 | jcs.default.cacheattributes.MaxObjects=10 20 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 21 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestTCPLateralCacheConcurrent.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | jcs.default=LTCP 18 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 19 | jcs.default.cacheattributes.MaxObjects=10000 20 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 21 | 22 | # #### AUXILIARY CACHES 23 | # simple Lateral TCP auxiliary 24 | jcs.auxiliary.LTCP=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory 25 | jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes 26 | jcs.auxiliary.LTCP.attributes.TransmissionTypeName=TCP 27 | # jcs.auxiliary.LTCP.attributes.TcpServers= 28 | jcs.auxiliary.LTCP.attributes.TcpListenerPort=1102 29 | jcs.auxiliary.LTCP.attributes.AllowGet=true 30 | 31 | 32 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestThrash.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | jcs.default= 18 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 19 | jcs.default.cacheattributes.MaxObjects=10000 20 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 21 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/TestZeroSizeCache.ccf: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # JCS Config for unit testing, just a simple memory only cache, with 0 max size 18 | # with the memory shrinker on. 19 | 20 | jcs.default= 21 | jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes 22 | jcs.default.cacheattributes.MaxObjects=0 23 | jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache 24 | jcs.default.cacheattributes.UseMemoryShrinker=true 25 | jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600 26 | jcs.default.cacheattributes.ShrinkerIntervalSeconds=1 27 | jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes 28 | jcs.default.elementattributes.IsEternal=false 29 | jcs.default.elementattributes.MaxLife=600 30 | jcs.default.elementattributes.IdleTime=1800 31 | jcs.default.elementattributes.IsSpool=true 32 | jcs.default.elementattributes.IsRemote=true 33 | jcs.default.elementattributes.IsLateral=true 34 | -------------------------------------------------------------------------------- /commons-jcs3-core/src/test/test-conf/logging.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | handlers=java.util.logging.FileHandler 18 | 19 | .level = INFO 20 | 21 | java.util.logging.FileHandler.level=INFO 22 | java.util.logging.FileHandler.pattern=target/jcs-logging-%g.log 23 | java.util.logging.FileHandler.limit = 100000 24 | java.util.logging.FileHandler.count = 2 25 | java.util.logging.FileHandler.append=true 26 | java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter 27 | java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] %3$s [%4$-7s] %5$s %n 28 | -------------------------------------------------------------------------------- /commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/AnyLiteral.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache.extras.cdi; 20 | 21 | import javax.enterprise.inject.Any; 22 | import javax.enterprise.util.AnnotationLiteral; 23 | 24 | public class AnyLiteral extends AnnotationLiteral implements Any 25 | { 26 | private static final long serialVersionUID = 3065708715639538185L; 27 | public static final AnyLiteral INSTANCE = new AnyLiteral(); 28 | 29 | @Override 30 | public String toString() 31 | { 32 | return "@javax.enterprise.inject.Any()"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/DefaultLiteral.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache.extras.cdi; 20 | 21 | import javax.enterprise.inject.Default; 22 | import javax.enterprise.util.AnnotationLiteral; 23 | 24 | public class DefaultLiteral extends AnnotationLiteral implements Default 25 | { 26 | private static final long serialVersionUID = -7075220723272831665L; 27 | public static final DefaultLiteral INSTANCE = new DefaultLiteral(); 28 | 29 | @Override 30 | public String toString() 31 | { 32 | return "@javax.enterprise.inject.Default()"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /commons-jcs3-jcache-extras/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | org.apache.commons.jcs3.jcache.extras.cdi.ExtraJCacheExtension 19 | -------------------------------------------------------------------------------- /commons-jcs3-jcache-extras/src/test/resources/META-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /commons-jcs3-jcache-openjpa/.gitignore: -------------------------------------------------------------------------------- 1 | /derby.log 2 | -------------------------------------------------------------------------------- /commons-jcs3-jcache-openjpa/src/main/resources/META-INF/services/org.apache.openjpa.lib.conf.ProductDerivation: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | org.apache.commons.jcs3.jcache.openjpa.OpenJPAJCacheDerivation 19 | -------------------------------------------------------------------------------- /commons-jcs3-jcache-tck/run-tck.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | mvn clean install -Djcache.tck 19 | 20 | -------------------------------------------------------------------------------- /commons-jcs3-jcache-tck/src/test/resources/ExcludeList: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # for tck this test needs to be excluded 19 | org.jsr107.tck.CachingTest#dummyTest 20 | -------------------------------------------------------------------------------- /commons-jcs3-jcache-tck/src/test/resources/META-INF/services/javax.cache.annotation.BeanProvider: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | org.apache.commons.jcs3.jcache.OWBBeanProvider 19 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/Asserts.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.jcache; 2 | 3 | import java.util.Objects; 4 | 5 | /* 6 | * Licensed to the Apache Software Foundation (ASF) under one 7 | * or more contributor license agreements. See the NOTICE file 8 | * distributed with this work for additional information 9 | * regarding copyright ownership. The ASF licenses this file 10 | * to you under the Apache License, Version 2.0 (the 11 | * "License"); you may not use this file except in compliance 12 | * with the License. You may obtain a copy of the License at 13 | * 14 | * https://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, 17 | * software distributed under the License is distributed on an 18 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 19 | * KIND, either express or implied. See the License for the 20 | * specific language governing permissions and limitations 21 | * under the License. 22 | */ 23 | 24 | public class Asserts 25 | { 26 | public static void assertNotNull(final Object value, final String name) 27 | { 28 | Objects.requireNonNull(name, () -> name + " is null"); 29 | } 30 | 31 | private Asserts() 32 | { 33 | // no-op 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/ImmutableIterable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache; 20 | 21 | import java.util.ArrayList; 22 | import java.util.Collection; 23 | import java.util.Iterator; 24 | 25 | public class ImmutableIterable implements Iterable 26 | { 27 | private final Collection delegate; 28 | 29 | public ImmutableIterable(final Collection delegate) 30 | { 31 | this.delegate = new ArrayList<>(delegate); 32 | } 33 | 34 | @Override 35 | public Iterator iterator() 36 | { 37 | return new ImmutableIterator<>(delegate.iterator()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/ImmutableIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache; 20 | 21 | import java.util.Iterator; 22 | 23 | public class ImmutableIterator implements Iterator 24 | { 25 | private final Iterator delegate; 26 | 27 | public ImmutableIterator(final Iterator delegate) 28 | { 29 | this.delegate = delegate; 30 | } 31 | 32 | @Override 33 | public boolean hasNext() 34 | { 35 | return delegate.hasNext(); 36 | } 37 | 38 | @Override 39 | public T next() 40 | { 41 | return delegate.next(); 42 | } 43 | 44 | @Override 45 | public void remove() 46 | { 47 | throw new UnsupportedOperationException("this iterator is immutable"); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/JCSEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache; 20 | 21 | import javax.cache.Cache; 22 | 23 | public class JCSEntry implements Cache.Entry 24 | { 25 | private final K key; 26 | private final V value; 27 | 28 | public JCSEntry(final K key, final V value) 29 | { 30 | this.key = key; 31 | this.value = value; 32 | } 33 | 34 | @Override 35 | public K getKey() 36 | { 37 | return key; 38 | } 39 | 40 | @Override 41 | public V getValue() 42 | { 43 | return value; 44 | } 45 | 46 | @Override 47 | public T unwrap(final Class clazz) 48 | { 49 | if (clazz.isInstance(this)) 50 | { 51 | return clazz.cast(this); 52 | } 53 | throw new UnsupportedOperationException(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/NoFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache; 20 | 21 | import javax.cache.event.CacheEntryEvent; 22 | import javax.cache.event.CacheEntryEventFilter; 23 | import javax.cache.event.CacheEntryListenerException; 24 | 25 | public class NoFilter implements CacheEntryEventFilter 26 | { 27 | public static final CacheEntryEventFilter INSTANCE = new NoFilter(); 28 | 29 | private NoFilter() 30 | { 31 | // no-op 32 | } 33 | 34 | @Override 35 | public boolean evaluate(final CacheEntryEvent event) throws CacheEntryListenerException 36 | { 37 | return true; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/NoLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache; 20 | 21 | import java.util.HashMap; 22 | import java.util.Map; 23 | 24 | import javax.cache.integration.CacheLoader; 25 | import javax.cache.integration.CacheLoaderException; 26 | 27 | public class NoLoader implements CacheLoader 28 | { 29 | public static final NoLoader INSTANCE = new NoLoader<>(); 30 | 31 | private NoLoader() 32 | { 33 | // no-op 34 | } 35 | 36 | @Override 37 | public V load(final K key) throws CacheLoaderException 38 | { 39 | return null; 40 | } 41 | 42 | @Override 43 | public Map loadAll(final Iterable keys) throws CacheLoaderException 44 | { 45 | final Map entries = new HashMap<>(); 46 | for (final K k : keys) 47 | { 48 | entries.put(k, null); 49 | } 50 | return entries; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/Times.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.jcache; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | public class Times 23 | { 24 | public static long now(final boolean ignore) 25 | { 26 | if (ignore) 27 | { 28 | return -1; 29 | } 30 | return System.nanoTime() / 1000; 31 | } 32 | 33 | private Times() 34 | { 35 | // no-op 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResolverImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache.cdi; 20 | 21 | import java.lang.annotation.Annotation; 22 | 23 | import javax.cache.Cache; 24 | import javax.cache.annotation.CacheInvocationContext; 25 | import javax.cache.annotation.CacheResolver; 26 | 27 | public class CacheResolverImpl implements CacheResolver 28 | { 29 | private final Cache delegate; 30 | 31 | public CacheResolverImpl(final Cache cache) 32 | { 33 | delegate = cache; 34 | } 35 | 36 | @Override 37 | public Cache resolveCache(final CacheInvocationContext cacheInvocationContext) 38 | { 39 | return (Cache) delegate; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/lang/DefaultSubsitutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.commons.jcs3.jcache.lang; 21 | 22 | public class DefaultSubsitutor implements Subsitutor 23 | { 24 | @Override 25 | public String substitute(final String value) 26 | { 27 | if (value.startsWith("${") && value.endsWith("}")) { 28 | return System.getProperty(value.substring("${".length(), value.length() - 1), value); 29 | } 30 | return value; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/lang/Lang3Substitutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | package org.apache.commons.jcs3.jcache.lang; 21 | 22 | import java.util.HashMap; 23 | import java.util.Map; 24 | 25 | import org.apache.commons.text.StringSubstitutor; 26 | 27 | public class Lang3Substitutor implements Subsitutor 28 | { 29 | private static final StringSubstitutor SUBSTITUTOR = new StringSubstitutor(new HashMap() 30 | { 31 | /** Serial version id */ 32 | private static final long serialVersionUID = 6568870218326105688L; 33 | 34 | { 35 | putAll(Map.class.cast(System.getProperties())); 36 | putAll(System.getenv()); 37 | } 38 | }); 39 | 40 | @Override 41 | public String substitute(final String value) 42 | { 43 | return SUBSTITUTOR.replace(value); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/serialization/Serializations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache.serialization; 20 | 21 | import org.apache.commons.jcs3.engine.behavior.IElementSerializer; 22 | 23 | public class Serializations 24 | { 25 | public static K copy(final IElementSerializer serializer, final ClassLoader loader, final K key) 26 | { 27 | try 28 | { 29 | return serializer.deSerialize(serializer.serialize(key), loader); 30 | } 31 | catch ( final Exception e) 32 | { 33 | throw new IllegalStateException(e); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/thread/DaemonThreadFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | package org.apache.commons.jcs3.jcache.thread; 20 | 21 | import java.util.concurrent.ThreadFactory; 22 | import java.util.concurrent.atomic.AtomicInteger; 23 | 24 | public class DaemonThreadFactory implements ThreadFactory 25 | { 26 | private final AtomicInteger index = new AtomicInteger(1); 27 | private final String prefix; 28 | 29 | public DaemonThreadFactory(final String prefix) 30 | { 31 | this.prefix = prefix; 32 | } 33 | 34 | @Override 35 | public Thread newThread( final Runnable runner ) 36 | { 37 | final Thread t = new Thread( runner ); 38 | t.setName(prefix + index.getAndIncrement()); 39 | t.setDaemon(true); 40 | return t; 41 | } 42 | } -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/resources/META-INF/services/javax.cache.spi.CachingProvider: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | org.apache.commons.jcs3.jcache.JCSCachingProvider 19 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | org.apache.commons.jcs3.jcache.cdi.MakeJCacheCDIInterceptorFriendly 18 | -------------------------------------------------------------------------------- /commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/CachingProviderTest.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs3.jcache; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import static org.junit.jupiter.api.Assertions.assertNotNull; 23 | 24 | import javax.cache.Caching; 25 | import javax.cache.spi.CachingProvider; 26 | 27 | import org.junit.jupiter.api.Test; 28 | 29 | class CachingProviderTest 30 | { 31 | @Test 32 | void testCreateCacheMgr() 33 | { 34 | final CachingProvider cachingProvider = Caching.getCachingProvider(); 35 | assertNotNull(cachingProvider.getCacheManager()); 36 | cachingProvider.close(); 37 | } 38 | 39 | @Test 40 | void testFindProvider() 41 | { 42 | assertNotNull(Caching.getCachingProvider()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-partitioned/src/main/java/org/apache/commons/jcs/utils/props/PropertiesFactory.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.utils.props; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.util.Properties; 23 | 24 | /** 25 | * Retrieves properties from a configurable source. 26 | */ 27 | public interface PropertiesFactory 28 | { 29 | /** 30 | * Fetches a set of properties for the specified group. 31 | * 32 | * @param groupName the group to pull properties from. 33 | * @return a properties object. 34 | */ 35 | Properties getProperties( String groupName ); 36 | } 37 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-partitioned/src/main/java/org/apache/commons/jcs/utils/props/PropertiesFactoryFileImpl.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.utils.props; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.util.Properties; 23 | 24 | /** 25 | * Goes to the file system to load a properties file. 26 | */ 27 | public class PropertiesFactoryFileImpl 28 | implements PropertiesFactory 29 | { 30 | /** 31 | * Loads the properties using the property loader. 32 | * @param groupName property group name 33 | * @return Properties 34 | */ 35 | @Override 36 | public Properties getProperties( String groupName ) 37 | { 38 | return PropertyLoader.loadProperties( groupName ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/beans/CacheChangeEvent.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.beans; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.core.ICache; 23 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 24 | /** 25 | */ 26 | @CopyRightApache 27 | public abstract class CacheChangeEvent extends java.util.EventObject { 28 | /** Creates a new instance of CacheEvent */ 29 | protected CacheChangeEvent(@NonNullable final ICache cache) { 30 | super(cache); 31 | } 32 | /** Returns the cache which is the source of the events. */ 33 | protected @NonNullable ICache getCache() { 34 | return (ICache)super.getSource(); 35 | } 36 | /** 37 | * Dispatches the beans handling to the specific method invokation of the 38 | * given handler. 39 | */ 40 | public abstract boolean dispatch(@NonNullable ICacheChangeHandler handler); 41 | } 42 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/beans/CacheClearEvent.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.beans; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.core.ICache; 23 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 24 | /** 25 | */ 26 | @CopyRightApache 27 | public class CacheClearEvent extends CacheChangeEvent { 28 | public CacheClearEvent(@NonNullable final ICache cache) 29 | { 30 | super(cache); 31 | } 32 | @Override 33 | public boolean dispatch(@NonNullable final ICacheChangeHandler handler) { 34 | return handler.handleClear(super.getCache().getName()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/beans/CachePutBeanCloneEvent.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.beans; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.core.ICache; 23 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 24 | /** 25 | */ 26 | @CopyRightApache 27 | public class CachePutBeanCloneEvent extends CachePutEvent { 28 | protected CachePutBeanCloneEvent(@NonNullable final ICache cache, 29 | @NonNullable final String key, @NonNullable final V val) 30 | { 31 | super(cache, key, val); 32 | } 33 | @Override 34 | public boolean dispatch(@NonNullable final ICacheChangeHandler handler) { 35 | return handler.handlePutBeanClone( 36 | super.getCache().getName(), super.getKey(), super.getValue()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/beans/CachePutBeanCopyEvent.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.beans; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.core.ICache; 23 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 24 | /** 25 | */ 26 | @CopyRightApache 27 | public class CachePutBeanCopyEvent extends CachePutEvent { 28 | public CachePutBeanCopyEvent(@NonNullable final ICache cache, 29 | @NonNullable final String key, @NonNullable final V val) 30 | { 31 | super(cache, key, val); 32 | } 33 | @Override 34 | public boolean dispatch(@NonNullable final ICacheChangeHandler handler) { 35 | return handler.handlePutBeanCopy( 36 | super.getCache().getName(), super.getKey(), super.getValue()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/beans/CachePutCopyEvent.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.beans; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.core.ICache; 23 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 24 | /** 25 | */ 26 | @CopyRightApache 27 | public class CachePutCopyEvent extends CachePutEvent { 28 | public CachePutCopyEvent(@NonNullable final ICache cache, 29 | @NonNullable final String key, @NonNullable final V val) 30 | { 31 | super(cache, key, val); 32 | } 33 | @Override 34 | public boolean dispatch(@NonNullable final ICacheChangeHandler handler) { 35 | return handler.handlePutCopy( 36 | super.getCache().getName(), super.getKey(), super.getValue()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/beans/CacheRemoveEvent.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.beans; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.core.ICache; 23 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 24 | /** 25 | */ 26 | @CopyRightApache 27 | public class CacheRemoveEvent extends CacheChangeEvent { 28 | private final @NonNullable String key; 29 | 30 | public CacheRemoveEvent(@NonNullable final ICache cache, 31 | @NonNullable final String key) 32 | { 33 | super(cache); 34 | this.key = key; 35 | } 36 | public @NonNullable String getKey() { 37 | return key; 38 | } 39 | @Override 40 | public boolean dispatch(@NonNullable final ICacheChangeHandler handler) { 41 | return handler.handleRemove(super.getCache().getName(), this.key); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/beans/ICacheChangeListener.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.beans; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 23 | 24 | /** 25 | * Cache change beans listener/handler. 26 | */ 27 | @CopyRightApache 28 | public interface ICacheChangeListener extends java.util.EventListener { 29 | void cacheChange(@NonNullable CacheChangeEvent evt); 30 | } 31 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/config/PerCacheConfig.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.config; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 23 | 24 | /** 25 | */ 26 | @CopyRightApache 27 | @JavaBean 28 | @TODO("configuration via XML file") 29 | public class PerCacheConfig { 30 | private boolean isCacheFileEnabled = true; 31 | 32 | public boolean setCacheFileEnabled(final boolean isCacheFileEnabled) { 33 | final boolean ret = this.isCacheFileEnabled; 34 | this.isCacheFileEnabled = isCacheFileEnabled; 35 | return ret; 36 | } 37 | 38 | public boolean isCacheFileEnabled() { 39 | return this.isCacheFileEnabled; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/config/YajCacheConfig.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.config; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 23 | 24 | import java.io.File; 25 | 26 | /** 27 | */ 28 | //@CopyRightApache 29 | //@TODO("Optional configuration via XML config file") 30 | // http://www.netbeans.org/issues/show_bug.cgi?id=53704 31 | public enum YajCacheConfig { 32 | inst; 33 | 34 | /** Root directory for cache overflow to file. */ 35 | private @NonNullable File cacheDir = new File("/tmp/yajcache"); 36 | 37 | YajCacheConfig() { 38 | this.cacheDir.mkdirs(); 39 | } 40 | 41 | public @NonNullable File getCacheDir() { 42 | return cacheDir; 43 | } 44 | void setCacheDir(final File cacheDir) { 45 | this.cacheDir = cacheDir; 46 | this.cacheDir.mkdirs(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/annotation/CopyRightApache.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.annotation.Documented; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | 26 | /** 27 | * Annotates the Apache Copyright. 28 | */ 29 | @CopyRightApache 30 | @Documented 31 | @Retention(RetentionPolicy.RUNTIME) 32 | public @interface CopyRightApache { 33 | CopyRightType value() default CopyRightType.APACHE; 34 | } 35 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/annotation/Immutable.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.annotation.Documented; 23 | import java.lang.annotation.ElementType; 24 | import java.lang.annotation.Inherited; 25 | import java.lang.annotation.Retention; 26 | import java.lang.annotation.RetentionPolicy; 27 | import java.lang.annotation.Target; 28 | 29 | /** 30 | * Element so annotated is expected to be immutable. 31 | */ 32 | @CopyRightApache 33 | @Documented 34 | @Inherited 35 | @Retention(RetentionPolicy.SOURCE) 36 | @Target({ 37 | ElementType.METHOD, // return value of a method is immutable 38 | ElementType.FIELD, // field is immutable 39 | ElementType.LOCAL_VARIABLE, // variable is immutable 40 | ElementType.PARAMETER // parameter is immutable 41 | }) 42 | public @interface Immutable { 43 | } 44 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/annotation/Implements.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | /** 23 | * Implements the specified interface. 24 | */ 25 | @CopyRightApache 26 | public @interface Implements { 27 | /** Interface being implemented. */ 28 | public Class value(); 29 | } 30 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/annotation/JavaBean.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.annotation.Documented; 23 | import java.lang.annotation.ElementType; 24 | import java.lang.annotation.Inherited; 25 | import java.lang.annotation.Retention; 26 | import java.lang.annotation.RetentionPolicy; 27 | import java.lang.annotation.Target; 28 | 29 | /** 30 | * Element so annotated is expected to be a JavaBean. 31 | */ 32 | @CopyRightApache 33 | @Documented 34 | @Inherited 35 | @Retention(RetentionPolicy.SOURCE) 36 | @Target({ 37 | ElementType.TYPE, // return value of a method is a 38 | ElementType.METHOD, // return value of a method is a 39 | ElementType.FIELD, // field is never null 40 | ElementType.LOCAL_VARIABLE, // variable is never null 41 | ElementType.PARAMETER // parameter is never null 42 | }) 43 | public @interface JavaBean { 44 | } 45 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/annotation/NonNullable.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.annotation.Documented; 23 | import java.lang.annotation.ElementType; 24 | import java.lang.annotation.Inherited; 25 | import java.lang.annotation.Retention; 26 | import java.lang.annotation.RetentionPolicy; 27 | import java.lang.annotation.Target; 28 | 29 | /** 30 | * Element so annotated is never expected to be null. 31 | */ 32 | @CopyRightApache 33 | @Documented 34 | @Inherited 35 | @Retention(RetentionPolicy.SOURCE) 36 | @Target({ 37 | ElementType.METHOD, // return value of a method is never null 38 | ElementType.FIELD, // field is never null 39 | ElementType.LOCAL_VARIABLE, // variable is never null 40 | ElementType.PARAMETER // parameter is never null 41 | }) 42 | public @interface NonNullable { 43 | } 44 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/annotation/TODO.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.annotation.Documented; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | 26 | /** 27 | * Annotates what needs to be done. 28 | */ 29 | @CopyRightApache 30 | @Documented 31 | @Retention(RetentionPolicy.SOURCE) 32 | public @interface TODO { 33 | /** Summary of what needs to be done. */ 34 | String value() default ""; 35 | /** Details of what needs to be done. */ 36 | String details() default ""; 37 | } 38 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/annotation/TestOnly.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.annotation.Documented; 23 | import java.lang.annotation.Inherited; 24 | import java.lang.annotation.Retention; 25 | import java.lang.annotation.RetentionPolicy; 26 | 27 | /** 28 | * Annotates the target is for testing purposes only. 29 | */ 30 | @CopyRightApache 31 | @Documented 32 | @Inherited 33 | @Retention(RetentionPolicy.RUNTIME) 34 | public @interface TestOnly { 35 | String value() default ""; 36 | } 37 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/annotation/ThreadSafety.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.annotation.Documented; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | 26 | /** 27 | * Characterizing thread safety. 28 | * 29 | * http://www-106.ibm.com/developerworks/java/library/j-jtp09263.html 30 | */ 31 | @CopyRightApache 32 | @Documented 33 | @Retention(RetentionPolicy.RUNTIME) 34 | public @interface ThreadSafety { 35 | ThreadSafetyType value(); 36 | String caveat() default ""; 37 | String note() default ""; 38 | } 39 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/annotation/UnsupportedOperation.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.annotation.Documented; 23 | import java.lang.annotation.ElementType; 24 | import java.lang.annotation.Retention; 25 | import java.lang.annotation.RetentionPolicy; 26 | import java.lang.annotation.Target; 27 | 28 | /** 29 | * Unsupported Operation. 30 | */ 31 | @CopyRightApache 32 | @Documented 33 | @Target(ElementType.METHOD) 34 | @Retention(RetentionPolicy.RUNTIME) 35 | public @interface UnsupportedOperation { 36 | String value() default ""; 37 | } 38 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/ref/IKey.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.ref; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 23 | /** 24 | * Interface for accessing a key. 25 | */ 26 | @CopyRightApache 27 | public interface IKey { 28 | /** Returns the key. */ 29 | @NonNullable @Immutable K getKey(); 30 | } 31 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/util/concurrent/locks/IKeyedReadWriteLock.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.util.concurrent.locks; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.yajcache.lang.annotation.*; 23 | 24 | import java.util.concurrent.locks.Lock; 25 | /** 26 | * Factory Interface for key specific ReadWriteLock. 27 | */ 28 | @CopyRightApache 29 | public interface IKeyedReadWriteLock { 30 | Lock readLock(K key); 31 | Lock writeLock(K key); 32 | } 33 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/test/java/org/apache/commons/jcs/yajcache/lang/annotation/CopyRightApacheTest.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.yajcache.lang.annotation; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import junit.framework.TestCase; 23 | 24 | import org.apache.commons.logging.Log; 25 | import org.apache.commons.logging.LogFactory; 26 | 27 | /** 28 | */ 29 | @CopyRightApache 30 | @TestOnly 31 | public class CopyRightApacheTest extends TestCase { 32 | private final Log log = LogFactory.getLog(this.getClass()); 33 | 34 | public void test() { 35 | log.debug(this.getClass().getAnnotation(CopyRightApache.class)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/commons-jcs3-yajcache/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /commons-jcs3-sandbox/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 23 | 4.0.0 24 | 25 | org.apache.commons 26 | commons-jcs3 27 | 3.3.0-SNAPSHOT 28 | 29 | 30 | commons-jcs3-sandbox 31 | pom 32 | 33 | Apache Commons JCS :: Sandbox 34 | 35 | 36 | commons-jcs3-yajcache 37 | commons-jcs3-filecache 38 | 39 | 40 | -------------------------------------------------------------------------------- /init-git-svn.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # !/bin/zsh -f 18 | cd .git;wget http://git.apache.org/authors.txt; cd .. 19 | git config svn.authorsfile ".git/authors.txt" 20 | git svn init --prefix=origin/ --tags=tags --trunk=trunk --branches=branches https://svn.apache.org/repos/asf/commons/proper/jcs 21 | git svn rebase 22 | -------------------------------------------------------------------------------- /jcache-fast.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | cd commons-jcs-core && mvn clean install -Dmaven.test.skip=true && cd - 19 | cd commons-jcs-jcache && mvn clean install && cd - 20 | cd commons-jcs-jcache-openjpa && mvn clean install && cd - 21 | cd commons-jcs-jcache-extras && mvn clean install && cd - 22 | cd commons-jcs-tck-tests && mvn clean install -Djcache.tck && cd - 23 | 24 | -------------------------------------------------------------------------------- /src/experimental/org/apache/commons/jcs/auxiliary/lateral/xmlrpc/behavior/ILateralCacheXMLRPCListener.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.auxiliary.lateral.xmlrpc.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.commons.jcs.auxiliary.lateral.behavior.ILateralCacheListener; 23 | 24 | import java.io.IOException; 25 | import java.io.Serializable; 26 | 27 | /** 28 | * Listens for lateral cache event notification. 29 | */ 30 | public interface ILateralCacheXMLRPCListener extends ILateralCacheListener 31 | { 32 | 33 | /** Description of the Method */ 34 | public void init(); 35 | 36 | /** Tries to get a requested item from the cache. */ 37 | public Serializable handleGet( String cacheName, K key ) 38 | throws IOException; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/experimental/org/apache/commons/jcs/auxiliary/lateral/xmlrpc/behavior/IXMLRPCConstants.java: -------------------------------------------------------------------------------- 1 | package org.apache.commons.jcs.auxiliary.lateral.xmlrpc.behavior; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * https://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | public interface IXMLRPCConstants { 23 | 24 | public static final String HANDLERNAME = "LATERAL_XMLRPC_CACHE"; 25 | public static final String NO_RESULTS = "NO_RESULTS"; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/scripts/cpappend.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | echo %_LIBJARS% 18 | set _LIBJARS=%_LIBJARS%;%1 19 | -------------------------------------------------------------------------------- /src/scripts/directory.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | set CURDIR=%2 18 | -------------------------------------------------------------------------------- /src/scripts/jgtest.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | @echo off 18 | 19 | call prep.bat 20 | 21 | rem-Dlog4j.configuration=I:/dev/jakarta-turbine-jcs/src/scripts/log4j.properties 22 | 23 | :run 24 | java org.jgroups.tests.McastReceiverTest -mcast_addr 224.10.10.10 -port 5555 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/scripts/jgtest_send.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | @echo off 18 | 19 | call prep.bat 20 | 21 | rem-Dlog4j.configuration=I:/dev/jakarta-turbine-jcs/src/scripts/log4j.properties 22 | 23 | :run 24 | java org.jgroups.tests.McastSenderTest -mcast_addr 224.10.10.10 -port 5555 -ttl 32 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/scripts/jgtest_send.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # !/bin/zsh -f 18 | THIS_DIR=$(dirname $0) 19 | 20 | export CLASSPATH=${THIS_DIR}/../../src/conf 21 | export CLASSPATH=${CLASSPATH}:${THIS_DIR}/../../target/test-classes 22 | export CLASSPATH=${CLASSPATH}:${THIS_DIR}/../../target/classes 23 | export CLASSPATH=${CLASSPATH}:. 24 | 25 | for i in `find ${THIS_DIR}/../../jars -name "*.jar" ` 26 | do 27 | export CLASSPATH=${CLASSPATH}:$i 28 | done 29 | 30 | 31 | 32 | echo ${CLASSPATH} 33 | # -Xrunhprof:cpu=samples,depth=6,thread=y 34 | 35 | ${JAVA_HOME}/bin/java -ms90m -mx400m -verbosegc -classpath "${CLASSPATH}" org.jgroups.tests.McastSenderTest -mcast_addr 224.10.10.10 -port 5555 -ttl 32 36 | -------------------------------------------------------------------------------- /src/scripts/prep.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | @rem echo off 18 | 19 | :setcurdir 20 | call setCURDIR 21 | echo %CURDIR% 22 | 23 | goto javahome 24 | 25 | :javahome 26 | if "%JAVA_HOME%" == "" goto noJavaHome 27 | goto setcpbase 28 | 29 | :noJavaHome 30 | echo Warning: JAVA_HOME environment variable is not set. 31 | set JAVA_HOME=C:\jdk1.2.2 32 | 33 | :setcpbase 34 | set CLASSPATH=. 35 | set CLASSPATH=%CLASSPATH%;%CURDIR%\src\conf\ 36 | set CLASSPATH=%CLASSPATH%;%CURDIR%\target\classes\ 37 | set CLASSPATH=%CLASSPATH%;%CURDIR%\target\test-classes\ 38 | set CLASSPATH=%CLASSPATH%;%CURDIR%\auxiliary-builds\jdk14\target\classes\ 39 | goto jars 40 | 41 | :jars 42 | set _LIBJARS= 43 | for %%i in (%CURDIR%\jars\*.jar) do call %CURDIR%\src\scripts\cpappend.bat %%i 44 | if not "%_LIBJARS%" == "" goto addLibJars 45 | 46 | :addLibJars 47 | set CLASSPATH=%CLASSPATH%;%_LIBJARS% 48 | 49 | -------------------------------------------------------------------------------- /src/scripts/remoteCacheStats.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | @echo on 18 | 19 | call prep.bat 20 | 21 | :run 22 | rem set DBUGPARM=-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=5000,suspend=n 23 | %JAVA_HOME%\bin\java %DBUGPARM% -ms10m -mx20m -classpath %CLASSPATH% "-Djava.security.policy=%CURDIR%\src\conf\cache.policy" org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerFactory -stats /remote.cache%1.ccf 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/scripts/remoteCacheStats.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # ! /bin/sh 18 | 19 | export CLASSPATH=. 20 | export CLASSPATH=${CLASSPATH}:`dirname $0`/../conf:/usr/java/jcs/conf:/usr/java/jcs/conf/ 21 | 22 | THISDIR=`dirname $0` 23 | 24 | for i in `find ${THISDIR}/../lib -name "*.jar" ` 25 | do 26 | export CLASSPATH=${CLASSPATH}:$i 27 | done 28 | echo "Classpath = ${CLASSPATH}" 29 | 30 | 31 | POLICY="-Djava.security.policy=`dirname $0`/../conf/cache.policy" 32 | 33 | HEAP="-Xms10m -Xmx20m" 34 | 35 | DEBUG="-verbose:gc -XX:+PrintTenuringDistribution" 36 | 37 | ARGS="$HEAP $DEBUG $POLICY" 38 | 39 | echo $ARGS 40 | 41 | java $ARGS org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerFactory -stats "$1" 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/scripts/setCURDIR.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | rem cd .. 18 | rem dir | find "Directory" > }{.bat 19 | rem echo set CURDIR=%%2> directory.bat 20 | rem for %%a in (call del) do %%a }{.bat 21 | rem cd bin 22 | 23 | cd ..\.. 24 | set CURDIR=%CD% 25 | echo %CURDIR% 26 | cd src 27 | cd scripts 28 | -------------------------------------------------------------------------------- /src/scripts/startJetty.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | @echo off 18 | 19 | call prep.bat 20 | 21 | :run 22 | rem set DBUGPARM=-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=5000,suspend=n 23 | %JAVA_HOME%\bin\java %DBUGPARM% -ms10m -mx200m -classpath %CLASSPATH% "-Djava.security.policy=%CURDIR%/conf/cache.policy" com.mortbay.Jetty.Server %CURDIR%/conf/myjetty%1.xml 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/scripts/startRemoteCache.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | @echo off 18 | 19 | call prep.bat 20 | 21 | :run 22 | rem set DBUGPARM=-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=5000,suspend=n 23 | 24 | rem -XX:+PrintTenuringDistribution 25 | 26 | java %DBUGPARM% -verbosegc -ms10m -mx200m -classpath %CLASSPATH% "-Djava.security.policy=%CURDIR%\src\conf\cache.policy" org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerFactory /remote.cache%1.ccf 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/scripts/startRemoteCache.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # ! /bin/sh 18 | 19 | export CLASSPATH=. 20 | export CLASSPATH=${CLASSPATH}:`dirname $0`/../conf:/usr/java/jcs/conf:/usr/java/jcs/conf/ 21 | 22 | THISDIR=`dirname $0` 23 | 24 | for i in `find ${THISDIR}/../lib -name "*.jar" ` 25 | do 26 | export CLASSPATH=${CLASSPATH}:$i 27 | done 28 | echo "Classpath = ${CLASSPATH}" 29 | 30 | # START THE REGISTRY 31 | if [ "$2" != "" ]; then 32 | echo "Starting the registry on port $2" 33 | rmiregistry $2 & 34 | else 35 | echo "Not starting registry, since no port was supplied." 36 | fi 37 | 38 | POLICY="-Djava.security.policy=`dirname $0`/../conf/cache.policy" 39 | 40 | HEAP="-Xms128m -Xmx512m" 41 | 42 | DEBUG="-verbose:gc -XX:+PrintTenuringDistribution" 43 | 44 | ARGS="$HEAP $DEBUG $POLICY" 45 | 46 | echo $ARGS 47 | 48 | java $ARGS org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerFactory "$1" 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/scripts/stopRemoteCache.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | @echo off 18 | 19 | call prep.bat 20 | 21 | :run 22 | rem org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerFactory 23 | rem set DBUGPARM=-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=5000,suspend=n 24 | %JAVA_HOME%\bin\java %DBUGPARM% -ms1m -mx20m -classpath %CLASSPATH% "-Djava.security.policy=C:/dev/cache/props/cache.policy" org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerFactory -shutdown /remote.cache.ccf 25 | 26 | -------------------------------------------------------------------------------- /src/scripts/tester.bat: -------------------------------------------------------------------------------- 1 | rem Licensed to the Apache Software Foundation (ASF) under one 2 | rem or more contributor license agreements. See the NOTICE file 3 | rem distributed with this work for additional information 4 | rem regarding copyright ownership. The ASF licenses this file 5 | rem to you under the Apache License, Version 2.0 (the 6 | rem "License"); you may not use this file except in compliance 7 | rem with the License. You may obtain a copy of the License at 8 | rem 9 | rem https://www.apache.org/licenses/LICENSE-2.0 10 | rem 11 | rem Unless required by applicable law or agreed to in writing, 12 | rem software distributed under the License is distributed on an 13 | rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | rem KIND, either express or implied. See the License for the 15 | rem specific language governing permissions and limitations 16 | rem under the License. 17 | @echo off 18 | 19 | call prep.bat 20 | 21 | rem-Dlog4j.configuration=I:/dev/jakarta-turbine-jcs/src/scripts/log4j.properties 22 | 23 | :run 24 | java -ms90m -mx400m -verbosegc org.apache.commons.jcs.access.TestCacheAccess /cache%1.ccf %2 %3 %4 %5 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/scripts/tester.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # !/bin/zsh -f 18 | THIS_DIR=$(dirname $0) 19 | 20 | export CLASSPATH=${THIS_DIR}/../../src/conf 21 | export CLASSPATH=${CLASSPATH}:${THIS_DIR}/../../target/test-classes 22 | export CLASSPATH=${CLASSPATH}:${THIS_DIR}/../../target/classes 23 | export CLASSPATH=${CLASSPATH}:. 24 | 25 | for i in `find ${THIS_DIR}/../../jars -name "*.jar" ` 26 | do 27 | export CLASSPATH=${CLASSPATH}:$i 28 | done 29 | 30 | 31 | 32 | echo ${CLASSPATH} 33 | # -Xrunhprof:cpu=samples,depth=6,thread=y 34 | 35 | ${JAVA_HOME}/bin/java -ms90m -mx400m -verbosegc -classpath "${CLASSPATH}" org.apache.commons.jcs.access.TestCacheAccess /cache$argv.ccf 36 | -------------------------------------------------------------------------------- /src/site/resources/download_jcs.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | 19 | # Just call the standard mirrors.cgi script. It will use download.html 20 | # as the input template. 21 | exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $* 22 | -------------------------------------------------------------------------------- /src/site/resources/profile.jacoco: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // https://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | -------------------------------------------------------------------------------- /xdocs/ProjectHistory.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | Project History 24 | Romain Manni-Bucau 25 | 26 | 27 | 28 |

29 | 30 |

31 | Project was created in 2002. It was first released under 32 | maven coordinates org.apache.jcs:jcs[:1.3]. 33 |

34 | 35 |

36 | Since 2014 and its version 2 it is released under coordinates 37 | org.apache.commons:commons-jcs-[core|jcache|*][:2.x]. 38 |

39 | 40 |
41 | 42 | 43 | --------------------------------------------------------------------------------