Java Code Examples for com.sun.jmx.examples.scandir.config.FileMatch#setSizeExceedsMaxBytes()
The following examples show how to use
com.sun.jmx.examples.scandir.config.FileMatch#setSizeExceedsMaxBytes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScanDirConfig.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 2
Source File: ScanDirConfig.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 3
Source File: ScanDirConfig.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 4
Source File: ScanDirConfig.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 5
Source File: ScanDirConfig.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 6
Source File: ScanDirConfig.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 7
Source File: ScanDirConfig.java From hottub with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 8
Source File: ScanDirConfig.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 9
Source File: ScanDirConfig.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 10
Source File: ScanDirConfig.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 11
Source File: ScanDirConfig.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }
Example 12
Source File: ScanDirConfig.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public DirectoryScannerConfig addDirectoryScanner(String name, String dir, String filePattern, long sizeExceedsMaxBytes, long sinceLastModified) { final DirectoryScannerConfig scanner = new DirectoryScannerConfig(name); scanner.setRootDirectory(dir); if (filePattern!=null||sizeExceedsMaxBytes>0||sinceLastModified>0) { final FileMatch filter = new FileMatch(); filter.setFilePattern(filePattern); filter.setSizeExceedsMaxBytes(sizeExceedsMaxBytes); if (sinceLastModified > 0) filter.setLastModifiedBefore(new Date(new Date().getTime() -sinceLastModified)); scanner.addIncludeFiles(filter); } synchronized (this) { config.putScan(scanner); status = MODIFIED; } LOG.fine("config: "+config); sendNotification(NOTIFICATION_MODIFIED); return scanner; }