public class FileSource extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
| Constructor and Description |
|---|
FileSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Working with Spring framework startup
|
void |
destroy()
Using when the Spring framework is destroy
|
void |
forceGarbageCollection()
Force garbage collection.
|
void |
forceGarbageCollection(float garbageThreshold)
Force garbage collection.
|
org.lokra.seaweedfs.core.Connection |
getConnection()
Get wrapper connection.
|
int |
getConnectionTimeout() |
int |
getFileStreamCacheEntries() |
long |
getFileStreamCacheSize() |
org.apache.http.client.cache.HttpCacheStorage |
getFileStreamCacheStorage() |
String |
getHost() |
int |
getIdleConnectionExpiry() |
int |
getLookupVolumeCacheEntries() |
int |
getLookupVolumeCacheExpiry() |
int |
getMaxConnection() |
int |
getMaxConnectionsPreRoute() |
int |
getPort() |
int |
getStatusExpiry() |
SystemClusterStatus |
getSystemClusterStatus()
Get master server cluster status.
|
SystemTopologyStatus |
getSystemTopologyStatus()
Get cluster topology status.
|
VolumeStatus |
getVolumeStatus(String volumeUrl)
Check volume server status.
|
boolean |
isEnableFileStreamCache() |
boolean |
isEnableLookupVolumeCache() |
void |
preAllocateVolumes(int sameRackCount,
int diffRackCount,
int diffDataCenterCount,
int count,
String dataCenter,
String ttl)
Pre-allocate volumes.
|
void |
setConnectionTimeout(int connectionTimeout) |
void |
setEnableFileStreamCache(boolean enableFileStreamCache) |
void |
setEnableLookupVolumeCache(boolean enableLookupVolumeCache) |
void |
setFileStreamCacheEntries(int fileStreamCacheEntries) |
void |
setFileStreamCacheSize(long fileStreamCacheSize) |
void |
setFileStreamCacheStorage(org.apache.http.client.cache.HttpCacheStorage fileStreamCacheStorage) |
void |
setHost(String host) |
void |
setIdleConnectionExpiry(int idleConnectionExpiry) |
void |
setLookupVolumeCacheEntries(int lookupVolumeCacheEntries) |
void |
setLookupVolumeCacheExpiry(int lookupVolumeCacheExpiry) |
void |
setMaxConnection(int maxConnection) |
void |
setMaxConnectionsPreRoute(int maxConnectionsPreRoute) |
void |
setPort(int port) |
void |
setStatusExpiry(int statusExpiry) |
void |
shutdown()
Shutdown connect to the any coinstack-storage server
|
void |
startup()
Start up the connection to the coinstack-storage server
|
public org.lokra.seaweedfs.core.Connection getConnection()
public void startup()
throws IOException
IOException - Http connection is fail or server response within some error message.public void shutdown()
public void forceGarbageCollection()
throws IOException
IOException - Http connection is fail or server response within some error message.public void forceGarbageCollection(float garbageThreshold)
throws IOException
garbageThreshold - Garbage threshold.IOException - Http connection is fail or server response within some error message.public void preAllocateVolumes(int sameRackCount,
int diffRackCount,
int diffDataCenterCount,
int count,
String dataCenter,
String ttl)
throws IOException
sameRackCount - Same rack count.diffRackCount - Different rack count.diffDataCenterCount - Different data center count.count - Count.dataCenter - Data center.ttl - Time to live.IOException - IOException Http connection is fail or server response within some error message.public SystemClusterStatus getSystemClusterStatus() throws CoinstackStorageException
CoinstackStorageException - Connection is shutdown.public SystemTopologyStatus getSystemTopologyStatus() throws CoinstackStorageException
CoinstackStorageException - Connection is shutdown.public VolumeStatus getVolumeStatus(String volumeUrl) throws IOException
volumeUrl - Volume server url.IOException - Connection is shutdown or
Http connection is fail or server response within some error message.public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanIOException - Http connection is fail or server response within some error message.Exceptionpublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanIOException - Http connection is fail or server response within some error message.Exceptionpublic String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public int getConnectionTimeout()
public void setConnectionTimeout(int connectionTimeout)
public int getStatusExpiry()
public void setStatusExpiry(int statusExpiry)
public int getMaxConnection()
public void setMaxConnection(int maxConnection)
public int getMaxConnectionsPreRoute()
public void setMaxConnectionsPreRoute(int maxConnectionsPreRoute)
public boolean isEnableLookupVolumeCache()
public void setEnableLookupVolumeCache(boolean enableLookupVolumeCache)
public int getLookupVolumeCacheExpiry()
public void setLookupVolumeCacheExpiry(int lookupVolumeCacheExpiry)
public int getIdleConnectionExpiry()
public void setIdleConnectionExpiry(int idleConnectionExpiry)
public int getLookupVolumeCacheEntries()
public void setLookupVolumeCacheEntries(int lookupVolumeCacheEntries)
public boolean isEnableFileStreamCache()
public void setEnableFileStreamCache(boolean enableFileStreamCache)
public int getFileStreamCacheEntries()
public void setFileStreamCacheEntries(int fileStreamCacheEntries)
public long getFileStreamCacheSize()
public void setFileStreamCacheSize(long fileStreamCacheSize)
public org.apache.http.client.cache.HttpCacheStorage getFileStreamCacheStorage()
public void setFileStreamCacheStorage(org.apache.http.client.cache.HttpCacheStorage fileStreamCacheStorage)
Copyright © 2017 Blocko Inc.. All rights reserved.